Multi Commander > Script
File comparision with archive support
(1/1)
jnarew:
Hello Mathias,
Thanks for MC. Now it becones a great tools as TC ;-)
My Request:
Comparision file content with archives support.
I found solution by macro: ( thread http://forum.multicommander.com/forum/index.php/topic,654.msg1751.html#msg1751 )
but this :
@var $cmd = "D:\\Programs\\WinMerge\\WinMergeU.exe";
@var $selectedPaths = GetSelectedPaths();
@var $path1;
@var $path2;
if (arrayCount($selectedPaths) == 2)
{
$path1 = $selectedPaths[0];
$path2 = $selectedPaths[1];
}
else
{
/*$path1 = GetSourceFocusPath();*/
/*$path2 = GetTargetFocusPath();*/
$path1 = GetTagValue("${leftfocuspath}");
$path2 = GetTagValue("${rightfocuspath}");
}
MC.Run CMD="{$cmd}" ARG='"{$path1}" "{$path2}"'
can't utilize archived files
I tried extending by studying macros API but giveup.
Best Regards
Janusz, Poland
Mathias (Author):
Problem is that full paths of the files are sent to WinMerge and WinMerge can't open a file inside a archive.
You need to copy the file from the archive to a temp locations first.
jnarew:
Thanks for quick answer,
Can You suggest me elementary script commands / code that:
a) Check if in panels source or target display archive content.
b) Extract (copy) highlighted file (source/target) to temporary folder.
I try test extending macro .
Regards,
Janusz
Mathias (Author):
There is no easy way to check that. you can get the complete path and check if the path part has .zip or .rar (or what archive it now is) in the path.
so if the path is "C:\MyFolder\MyArchive.zip\MyFolder\myfile.txt" Then the file is located inside an archive.
Mathias (Author):
or you can do the opposite. check if the filepath really exists (real file)
--- Code: ---@var $res = FileExists("C:\\temp\\MyFile.txt");
--- End code ---
if $res get the value 1 then the file exists on the normal filesystem
Navigation
[0] Message Index
Go to full version