XY Copy Handler can be beaten to its knees - maybe tweak the Help

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Malarki
Posts: 208
Joined: 03 Dec 2019 02:51
Location: Windows 10 x64; 100% Scaling

XY Copy Handler can be beaten to its knees - maybe tweak the Help

Post by Malarki »

Windows 10 x64, XY ~v26.50 (recent beta).

I recently wrote a script that captured a list of all folders in the current location, looked at each one, and if it met certain criterial copied it off to another folder on the same mechanical external drive.

In Settings | File Operations I had long ago enabled "Background processing" but had not noticed or enabled "Queue file operations".

Being short on either time, insight, experience, or skill - not sure which - I had the test + copy in a For Next loop carried out on a per-folder basis. So an SC Copy was being initiated on most of those loops, and these operations quickly stacked up to dozens. At which point many of the Copy ops froze, or silently quit. After a while I had to kill XY because it had stopped responding and the few visible copy progress boxes had stopped advancing.

My solution was to carry out the folder criteria checks and if appropriate add that folder's name to a string. Then when all checks were done, tell SC "CopyTo" to do the whole string which it completed one folder at a time (I suppose) with no problems.

Queueing would probably have prevented this, but that's not enabled by default and as mentioned I didn't run across it or think of it.

So I suggest that the Help for SC CopyTo could mention this possible problem and the best solution. Also btw in that same Help it could be made clear that the "source location" can be a delimited string of items. I wasn't sure that would or should work until I tried it.

Thx

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: XY Copy Handler can be beaten to its knees - maybe tweak the Help

Post by highend »

This, before the loop would have been a correct solution:

setting "BackgroundFileOps", 0;

copyto is not a function, but a command. XY won't wait until it's finished if the above isn't used
One of my scripts helped you out? Please donate via Paypal

Post Reply