This includes folders named with ".txt" ....
Code: Select all
$findext="*.txt;*.pdf";
$found=quicksearch($findext, <curpath>);
msg "Found...<br>" . $found,0;
Code: Select all
$findext="*.txt;*.pdf";
$found=quicksearch($findext, <curpath>);
msg "Found...<br>" . $found,0;
$findext="*.txt;*.pdf /f";
Code: Select all
$findext="*.txt;*.pdf";
$found=quicksearch($findext . " /f", <curpath>);
Code: Select all
"Move Here from Subfolders - txt/pdf"
$moveext="*.txt;*.pdf;";
$movefiles = quicksearch($moveext . " /f", <curpath>);
// msg "Found:<br>" . $movefiles, 0;
foreach($movefile, $movefiles, <crlf>, "e") {
status "Moving " . gpc($movefile, "file") . " ...", , "progress";
$movebase=gpc($movefile,"path");
// same $gpc($movefile,"component", -2, 1);
if ($movebase != "<curpath>") {
// $m="moveto(<br>curpath=<curpath>";
// $m="$m <br>movefile=$movefile";
// msg $m,0;
moveto(<curpath>,$movefile);
}
}
Code: Select all
load "MoveHere_FromSub_txtpdf.xys"
Code: Select all
run '"C:\Program Files\Notepad3\Notepad3.exe" "%appdata%\XYplorer\Scripts\MoveHere_FromSub_txtpdf.xys"' ;
Code: Select all
$moveExts = "*.txt;*.pdf";
$moveFiles = quicksearch($moveExts . " /f");
// Remove all items that are already in this path
$escaped = regexreplace(<curpath>, "([\\.+(){\[^$])", "\$1");
$moveFiles = regexreplace($moveFiles, "$escaped\\[^\\]+?(\r?\n|$)");
if ($moveFiles) { moveto , $moveFiles, , 1, 2, 2; }
Code: Select all
run """C:\Program Files\Notepad3\Notepad3.exe"" ""<xyscripts>\MoveHere_FromSub_txtpdf.xys""";