Background processing - copy problem

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Background processing - copy problem

Post by highend »

Code: Select all

	// Copy Settings|Extension|SendTo ... etc. items to their parent folder
	foreach($file, $settingsFiles, "|") {
		if($file != "") {
			$dstPath = replace(regexreplace($file, "(.*(?=\\)).*", "$1"), $osVer, "");
			copyto $dstPath, $file;
		}
	}
This routine copies .bat files to a folder one level higher than where they come from, e.g.:

D:\Tools\Bulk Rename Utility\.Settings\Windows_7\.Settings [Install].bat
to
D:\Tools\Bulk Rename Utility\.Settings

The $osVer in this case is "Windows_7".

Custom Copy is enabled for all copy operations.
Name collisions = overwrite.

Actually, $settingsFiles contains 25 .bat files, separated via "|".

My problem:
Only the first 11 files are copied, the other files are in a "loading" state. Please look at the screenshot.
Unbenannt.png
I have to quit XY because the other 14 copy elements won't get executed. There aren't any permission
issues, "Everyone" has full access to all files / folders on that SSD.

When I switch off "background processing" copying all files works flawlessly.
Part of my problem: I could live without background processing by turning it off in the script but I use
"Show progress dialog" by default in the custom copy settings and so I get 25 dialog windows during
the copying process (which ofc go away by themselfes (keep progress dialog open is switched off) but it just
looks ... dumb :)

Any hints, why background processing causes these issues?
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Background processing - copy problem

Post by nas8e9 »

At first glance it looks like some sort of resource exhaustion problem due to starting 25 separate jobs in quick succession (i.e. in parallel).

As for preventing it, do you have Configuration > File Operations > Background Processing > Queue file operations, enabled? If not, I'd try with that setting enabled. Unfortunately, I can't find a way to change that setting in code.

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

Re: Background processing - copy problem

Post by highend »

Configuration > File Operations > Background Processing > Queue file operations, enabled?
That works, thank you!
Unfortunately, I can't find a way to change that setting in code.
setting() doesn't support it ;(

I'd like to be able to switch "Show progress dialog" on / off via scripting as well. The current behavior "isn't mine"...
Circling popups for many files isn't that great ;)

Isn't it possible to "reuse" the last progress dialog window that we only ever have one visible as long as file operations are pending / going on?
One of my scripts helped you out? Please donate via Paypal

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Background processing - copy problem

Post by nas8e9 »

highend wrote:
Unfortunately, I can't find a way to change that setting in code.
setting() doesn't support it ;(

I'd like to be able to switch "Show progress dialog" on / off via scripting as well. The current behavior "isn't mine"...
Circling popups for many files isn't that great ;)

Isn't it possible to "reuse" the last progress dialog window that we only ever have one visible as long as file operations are pending / going on?
Three wishes, I'm afraid.

Filehero
Posts: 2734
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Background processing - copy problem

Post by Filehero »

highend wrote:I'd like to be able to switch "Show progress dialog" on / off via scripting as well. The current behavior "isn't mine"...
Circling popups for many files isn't that great ;)
+100 :wink:


Cheers,
Filehero

admin
Site Admin
Posts: 67326
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Background processing - copy problem

Post by admin »

I see I see... Remind me after MLS (Multilingual Support).

(Cannot explain the "Loading..." issue without further testing.)

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

Re: Background processing - copy problem

Post by highend »

Gz Don for finishing MLS!

Can you now please have a look at our minor feature requests here? Thanks.
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67326
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Background processing - copy problem

Post by admin »

highend wrote:Gz Don for finishing MLS!

Can you now please have a look at our minor feature requests here? Thanks.
"finishing"? Well, that's phase one. :) It will be a long time till it's completely finished (= until we have at least one alternative language version completely done and published).

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

Re: Background processing - copy problem

Post by highend »

"finishing"? Well, that's phase one.
I meant: You've finished your part. Ofc it will take a while until all the translations are available (although I won't use a different one than plain english...).

Back to topic:

I'd be thankful if we can switch off these settings with script commands:
Configuration > File Operations > Background Processing > Queue file operations
Configuration > File Operations > Custom Copy Operations > Configure... > Show progress dialog

And a more general feature request:
Isn't it possible to "reuse" the last progress dialog window that we only ever have one visible as long as file operations are pending / going on instead of getting one by one for each single file, that get's copied?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67326
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Background processing - copy problem

Post by admin »

No, I finished my first part. I'm already sitting on my next part (upgrading the LNG file), and I expect feedback from the translators conc. unforeseen problems. It's not over.

Post Reply