@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;
use FileHandle;
#hardcoded
my $FP = 'Y:\graphics_qc';
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);
system("start $to_dir"); # this will open folder in win explorer
system("start $from_dir"); # this will open folder in win explorer
exit 0;
__END__
:endofperl
FAR: command line switches wrote: It is possible to specify at most two paths to folder, files or archives in the command line. The first path applies to the active panel, the second path - to the passive
one:
- if a folder or archive is specified, FAR will show its contents
- if a file is specified, FAR will change to the folder where it
resides and place the cursor on the file, if it exists.
It is possible to specify at most two paths (to folders, files or archives)
or two commands with plugin prefix in the command line. The first path
applies to the active panel, the second path - to the passive one:
- if a folder or archive is specified, Far will show its contents;
- if a file is specified, Far will change to the folder where it resides
and place the cursor on the file, if it exists;
- when prefixes specified (simultaneous use with common paths allowed)
passive command executes first (passive panel activates temporary).
Single letter prefixes A-Z or conflicted with disk letter will be
ignored.
Example: far arc:c:\Far20.7z "macro:post msgbox('Far Manager','Successfully started')"