So I just picked up XYplorer & it's pretty "chk-chk", I must say

I also just made my first script, which copies any selected files into an "(Archive)" folder at the current path with an added timestamp suffix. The script also "beeps" and displays a summary of the operation in the status bar ( timestamp + parent folder + files copied). Here is the script:
Code: Select all
/* Variables */
$strDateStamp = "<date mm-dd @ hh-nn-ss> ";
$strCurrentFolderName = "/ <curfolder> / ";
$strTargetItemNames = regexmatches("<selitems>", "[^\\]+\.\w+");
$strModifiedItemNames = RegExReplace($strTargetItemNames, "\|", " | ");
/* Commands */
copyas "* [<date yyyy-mm-dd @ hh-nn-ss>].?", "<curpath>\( Archive )";
beep 2000,50; beep 2000,100;
status $strDateStamp $strCurrentFolderName $strModifiedItemNames, "009900", "ready";
[1] The status bar summary (image A) is displayed immediately, only to be pushed aside by "all background jobs completed" (image B) when the copy operation is finished.
[2] The beep command is executed before the copy operation has completed.

Really, both of those issues have the same root cause: the commands are executed before the copy operation has completed.
Is there a way to require commands to be processed one at a time, pausing until each command is complete? Kind of in a "queue" or "stepped" (without confirmations) fashion? (I'm sure theres a proper term for that, but I'm not sure what it is...
Also, I don't think a "wait|pause|sleep x" function would work well in this case, as copy operations can take anywhere from a few seconds to an hour or more, and I don't believe that variable can be accounted for accurately.
Ideally, this code would perform the copy operation and only beep & display the status bar summary at the moment of completion. For example, if you need to back up a few gigs of important data, and want to leave your computer in peace and bang out a few of these while you wait
Thanks for any help!
XYplorer Beta Club