Code: Select all
D:\Test\1.txt
D:\Test\2.txtCode: Select all
copy D:\Test\1.txt + D:\Test\2.txt D:\Test\merge.txtCode: Select all
The system cannot find the file specified.Code: Select all
D:\Test\1.txt
D:\Test\2.txtCode: Select all
copy D:\Test\1.txt + D:\Test\2.txt D:\Test\merge.txtCode: Select all
The system cannot find the file specified.Code: Select all
if (<get CountSelected> >= 2) {
$selected = <get SelectedItemsPathNames '" + "'>;
$dstFile = gpc(gettoken($selected, 1, '" + "'), "path") . "\merge.txt";
$arguments = quote($selected) . " " . quote($dstFile);
end (runret("""cmd"" /c copy /b $arguments", , 65001, 2) != 0), "Joining failed for an unknown reason...";
}
Thanks. It works as expected!highend wrote: ↑27 Dec 2020 22:09 A bit more generic (works for a count of selected files >= 2) where the merge.txt is stored in the dst path of the first selected file
Code: Select all
if (<get CountSelected> >= 2) { $selected = <get SelectedItemsPathNames '" + "'>; $dstFile = gpc(gettoken($selected, 1, '" + "'), "path") . "\merge.txt"; $arguments = quote($selected) . " " . quote($dstFile); end (runret("""cmd"" /c copy /b $arguments", , 65001, 2) != 0), "Joining failed for an unknown reason..."; }