View Single Post
Join Date: Sep 2008
Posts: 8
Reputation: viktorijakup is an unknown quantity at this point 
Solved Threads: 0
viktorijakup viktorijakup is offline Offline
Newbie Poster

How to open directory ?!

 
0
  #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...??!


  1. @rem = '--*-Perl-*--
  2. @echo off
  3. if "%OS%" == "Windows_NT" goto WinNT
  4. perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
  5. goto endofperl
  6. :WinNT
  7. perl -x -S %0 %*
  8. if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
  9. if %errorlevel% == 9009 echo You do not have Perl in your PATH.
  10. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
  11. goto endofperl
  12. @rem ';
  13. #!/usr/bin/perl
  14. use warnings;
  15. use strict;
  16. use File::Path;
  17. use Cwd;
  18. use File::Copy;
  19. use File::Spec::Functions;
  20. #hardcoded
  21. my $FP = 'Y:\graphics_qs';
  22. my $TP = 'Y:\plot_db';
  23. my ($from_file, $to_file) = ($ARGV[0], $ARGV[0]);
  24. my $cwd = `cd`;
  25. chomp $cwd;
  26. my ($from_dir, $to_dir) = ($cwd, $cwd);
  27. #rename dir part
  28. $to_dir =~ s/^\Q$FP\E/$TP/;
  29. mkpath($to_dir);
  30. exit 0;
  31.  
  32. __END__
  33. :endofperl

Regards !!!

Viki
Reply With Quote