Paste into Multiple Folders ?
Paste into Multiple Folders ?
Good afternoon,
Recently I had to add a file to many, many folders (.nomedia file for Kodi). I created the file, select/copied it, used Search to find all my Extras folders, inside of Search Results I selected all the folders, right-click and Paste. The .nomedia file was only copied to the last selected folder and not all of them.
I also tried a smaller experiment in the file pane and not within Search Results and had the same end result.
Is it not possible to paste into multiple selected locations (w/o the use of scripting) ? or am I missing some option/method. For now, I ended up right-clicking on each folder, paste, next folder, repeat.
Recently I had to add a file to many, many folders (.nomedia file for Kodi). I created the file, select/copied it, used Search to find all my Extras folders, inside of Search Results I selected all the folders, right-click and Paste. The .nomedia file was only copied to the last selected folder and not all of them.
I also tried a smaller experiment in the file pane and not within Search Results and had the same end result.
Is it not possible to paste into multiple selected locations (w/o the use of scripting) ? or am I missing some option/method. For now, I ended up right-clicking on each folder, paste, next folder, repeat.
Re: Paste into Multiple Folders ?
Afaik not possible without scripting (but I may be wrong)
One of my scripts helped you out? Please donate via Paypal
Re: Paste into Multiple Folders ?
I revisited this today and came up with this script. Added it as a CTB and Hamburger entry and it's working perfectly. Do you have any improvements for the script that would recommend ? or good as-is ? :
Since there doesn't appear to be a way to do this w/o scripting, would it be possible to move this over to Wishes and see if Don could add this as a feature request ?
Code: Select all
foreach($item, <get SelectedItemsPathNames |>) {
$folder = gpc($item, "base");
pasteto "$folder";
}
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Paste into Multiple Folders ?
If more than one folder is selected in the file list and then you paste via context menu or just by Ctrl+V then I think it would be okay to copy the clipboard (copy only, not cut) contents to all of those folders. So what you expected to work in your first post should have just worked. It would be a new feature, but IMO I should add it and it should just work (no settings or new commands necessary).
Any objections?
Any objections?
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Paste into Multiple Folders ?
Looked into it and saw complications building up. Given the rareness of this demand I think the script above is the perfect solution.
FAQ | XY News RSS | XY Twitter
Re: Paste into Multiple Folders ?
Thank you for taking the time to look into it. The script option is working great. I'll continue to use this method.
Re: Paste into Multiple Folders ?
Well, I often have similar need to copy the same file into multiple folders.
I tried the script method and I am encountering rather surprising problem:
the script runs as intended BUT the file is copied ONLY up to 17 times.
If I select a large number destination folders, only the first several folders (typically anywhere between 14 to 17) will get it.
Then I see the stripped white-and-blue "Non-completed Background Jobs" icon turning.
If I click on it, I get a nice list with many entries, all similar to this:
Loading Copy "<source path goes here>\.filename.1.txt", target: "<destination path goes here>\<destination folder>" Parallel. Initiated: 2/6/2022 10:44:05 PM
But the Jobs never finish...
Any suggestions how to fix this?
I tried the script method and I am encountering rather surprising problem:
the script runs as intended BUT the file is copied ONLY up to 17 times.
If I select a large number destination folders, only the first several folders (typically anywhere between 14 to 17) will get it.
Then I see the stripped white-and-blue "Non-completed Background Jobs" icon turning.
If I click on it, I get a nice list with many entries, all similar to this:
Loading Copy "<source path goes here>\.filename.1.txt", target: "<destination path goes here>\<destination folder>" Parallel. Initiated: 2/6/2022 10:44:05 PM
But the Jobs never finish...
Any suggestions how to fix this?
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Paste into Multiple Folders ?
That's indeed a surprising problem. Can anyone confirm? (I have no time ATM)
FAQ | XY News RSS | XY Twitter
Re: Paste into Multiple Folders ?
A simple quick test with 21 folders revealed no problems here.
EDIT:
Well, I just noticed a different problem:
When I have (1) Queue file operations off and (2) Custom Copy on and (3) also Create log file on
then some copy processes say of the log file that they can't write to it because it is used by another process.
Seems understandable when thinking about it, but one will mostly only think about it when he/she sees the error message.
EDIT:
Well, I just noticed a different problem:
When I have (1) Queue file operations off and (2) Custom Copy on and (3) also Create log file on
then some copy processes say of the log file that they can't write to it because it is used by another process.
Seems understandable when thinking about it, but one will mostly only think about it when he/she sees the error message.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
Re: Paste into Multiple Folders ?
I take that first "no problems found" report back.
At first it seemed fine because I did not pay attention to the status bar.
All copied files also show up in all target folders.
However, now I just realized that the status bar (and the background jobs list dialog) reports, as it seems, a few "hanging" copy processes.
The task manager confirms that, although task manager shows more such ones than the background jobs dialog.
At first it seemed fine because I did not pay attention to the status bar.
All copied files also show up in all target folders.
However, now I just realized that the status bar (and the background jobs list dialog) reports, as it seems, a few "hanging" copy processes.
The task manager confirms that, although task manager shows more such ones than the background jobs dialog.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Paste into Multiple Folders ?
Tested it now with 20 targets: works well in foreground and background, but it's recommended that you turn off "Show progress dialog" and "Keep progress dialog open" in Configuration | File Operations | File Operations | Custom Copy Operations | Configure...
FAQ | XY News RSS | XY Twitter
Re: Paste into Multiple Folders ?
@jerryzak: I haven't time to test this, and not sure if it will suit your use-case but maybe if you adjust the script to force foreground ops so that the queue doesn't get used, and they are processed sequentially, would be one way to mitigate it, something like this:
Code: Select all
setting "BackgroundFileOps", 0;
foreach($fol, formatlist(<get selecteditemspathnamesslashed |>, "f",, "*\")) { pasteto $fol; }
Re: Paste into Multiple Folders ?
Is not the queue exactly meant to process threads sequentially (opposed to parallel)?
So, you probably mean so that the queue is forced to be used?
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
Re: Paste into Multiple Folders ?
Well the issue as described (I haven't tested) seems to be ghost entries in the queue, so what I meant was that the whole sequence will complete, not get stuck in the sequence of updating the queue entries status's.
Re: Paste into Multiple Folders ?
ah, foreground instead of (queued or unqueued) background processing. Now I get it. Thanks for elaborating further.
EDIT: Yes, I think it helps. Based on my very simple test.
EDIT: Yes, I think it helps. Based on my very simple test.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList