RSS Forums RSS

How to open directory ?!

Please support our Perl advertiser: Programming Forums
Reply
Posts: 4
Reputation: viktorijakup is an unknown quantity at this point 
Solved Threads: 0
viktorijakup viktorijakup is offline Offline
Newbie Poster

How to open directory ?!

  #1  
Sep 22nd, 2008
Hi !!!

This script create folder.
I need what this script create and open created folder.
What I must add in this script...??!


@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S %0 %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!/usr/bin/perl
use warnings;
use strict;
use File::Path;
use Cwd;
use File::Copy;
use File::Spec::Functions;
#hardcoded 
my $FP = 'Y:\graphics_qs';
my $TP = 'Y:\plot_db';
my ($from_file, $to_file) = ($ARGV[0], $ARGV[0]);
my $cwd = `cd`;
chomp $cwd;
my ($from_dir, $to_dir) = ($cwd, $cwd);
#rename dir part
$to_dir =~ s/^\Q$FP\E/$TP/;
mkpath($to_dir);
exit 0;

__END__
:endofperl

Regards !!!

Viki
AddThis Social Bookmark Button
Reply With Quote  
Posts: 843
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 63
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: How to open directory ?!

  #2  
Sep 22nd, 2008
Reply With Quote  
Posts: 4
Reputation: viktorijakup is an unknown quantity at this point 
Solved Threads: 0
viktorijakup viktorijakup is offline Offline
Newbie Poster

Re: How to open directory ?!

  #3  
Sep 22nd, 2008
Hi !!!

system("start $to_dir"); # this will open folder in win explorer

But I need the same in "Far manager".

Reply With Quote  
Posts: 843
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 63
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: How to open directory ?!

  #4  
Sep 22nd, 2008
Like everyone already told you on the other forum, nobody knows what Far Manager is. I"ve never heard of it either.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Views: 1682 | Replies: 3 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:08 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC