Help - Deletion Confirmation, Work on Selected

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Help - Deletion Confirmation, Work on Selected

Post by SkyFrontier »

Hi, people!

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";
to
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... :evil:

EDIT: I was so pissed that I've put the code as a quote. Sorry, guys.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Help - Deletion Confirmation, Work on Selected

Post by SkyFrontier »

-can someone please provide a list reporting how many and the names of what files (no path) will be deleted, with an "ok/cancel" button, too?
Thanks.
(ouch! :( )
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply