I need this
Code: Select all
End GetInfo("CountSelected") < 1, "No item(s) selected.";
Global $files;
$files = Report("{Dir |{FullName};{Ext}<crlf>|}", 1);
Setting "AllowRecursion", 1;
Sub "_ZERO";
$files = RegexReplace($files, "^(.*);.*<crlf>", "$1|");
Delete 1,1,$files;
End GetInfo("CountSelected") < 1, "No item(s) selected.";
Global $files;
// sel $files; //selects
rename s, "-01/";
rename b, "_*";
"_ZERO"
Global $files, $i;
$i = $i Like "" ? 1 : $i;
$token = GetToken($files, $i, "<crlf>");
End $token Like "",, 1;
$file = GetToken($token, 1, ";");
$ext = GetToken($token, 2, ";");
$newFile = RegexReplace($file, "$ext$", "$ext");
New $newFile;
$i = $i + 1;
Sub "_ZERO";
1) Pop a confirm menu - can't understand, "Delete 1,1" means it SHOULD pop a confirmation, but it doesn't. Does this need to turn on "deletion confirm" on XY/system itself? If so, can this set the proper config and UNDO this changing after task complete?
2) Work on all selected files. It works with a single file only, but if I run it on more than one, it only renames one file with an uderscore and stops.
3) When it happens, can the resulting files have a check for "__", renaming them as a single "_" at the begining of the name?
Thanks!
>>TAKE CARE WHEN USING THIS BEAST: I just got deleted my entire selected scripts for personal usage plus backups of XY installers (thank heavens I've found "sel f" on time and had backup of those scripts, otherwise the damage would be total CHAOS!).
Now I'll go outside and scream madly...
EDIT: I was so pissed that I've put the code as a quote. Sorry, guys.
XYplorer Beta Club