Copy to Multiple Destination Tabs/Folders

G'Day,

Is there any way of copying the one file (or set of files) to multiple locations in one go?

I've got a bunch of folders (on remote PCs) and I want to copy the one file to all of them.

Is there a 'copy-to-all-tabs-in-destination-lister' command, or a 'synchronize-one-folder-with-multiple-destination-folders' command.

At the moment I'm just dragging the one file to each tab in turn, which is slow and annoying, so if anyone can suggest a way to script this, that'd be awesome.

Cheers,
Sam.

Are the destination folders always the same ?

They're fairly static, and if you have a good solution for that (other than just writing a script/button containing the addresses) I'd like to hear about it, but I was mainly after a (quick) way of copying to whatever open tabs I have at the time.
Any ideas?

I need this functionality also.. Someone have a solution?

Doing it to a fixed (or rarely changing) set of destination folders is easy.

Doing it to whichever folders are currently open in tabs isn't easy (except by copying to each tab individually, e.g. you can drag & drop on to the folder tab label).

How do you do it to a fixed or rarely changing set of directories?

This will copy the selected files to two folders:

Copy TO "D:\Temp\New Folder\Folder 1"
Copy TO "D:\Temp\New Folder\Folder 2"

If you are prompted because a file already exists, be careful. If you skip a file during the first copy, it will be marked as "failed" for the whole operation and thus be skipped in the second copy (whether or not a file with the same name already exists in the second dir).

Thanks! I'll give that a try.

Greetings,
And what about if we will not doing it to a fixed set of destination folders? In other words, how we can copy a single selected dir/file from source to multiple selected dirs in destination lister? I checked the following code:

@set strDirName = {filepath$}
dopusrt /cmd Copy {$strDirName} TO {filepathdest$}

but not worked!

I think you might be trying too hard with all the @set and dopusrt stuff, but maybe you were using that for a reason that you thought might help you get past some limitations you run into with more basic versions of the command you're trying.

Maybe GPsoft can improve this a bit - or have another idea than mine. But in the meantime, you can try something like:

Set SOURCE=Toggle
Copy FILE={allfilepathdest$} TO={filepath$}
Set SOURCE=Toggle

Not sure if there are situations where this might not work as expected... but in some testing here it works every time. It'll cause some visual jerkiness as the source/dest paths are swapped around... which I'm doing for the benefit of being able to rely on the way Opus runs each of the button commands once for each selected item in the source (as opposed to it seeming to NOT do the same for multiple selected dest items). This way, Opus copies all of the now-swapped-destination files selected to each of the now-swapped-source folders selected.

Your code worked here too. Thanks a million dear steje.

Wow, nice hack, steje. :slight_smile:

Note that this code also works with folders in collections (if added as members).

Note that this code allows you to copy 'multiple' items to 'multiple' selected destination folders. Your question was about copying a 'single' file or folder, probably just to distinguish what your copying from the fact that you wanted to make it clear you wanted to copy to 'multiple' destinations.

Only mentioning it to make sure you don't think you need to run the button multiple times against 'single' items you want to copy from the same source one-at-a-time or something like that...

Yes, you are right. Your code is excellent. If I need to copy a single file/dir, surely I will select just one :wink: Having a right to choice always is better. :thumbsup:

Unfortunately I met the first bug :frowning: : If source and destination have the same path, this code will work in reverse! (i.e. all of the files/dirs selected in destination will be copied to the selected dir at source lister)

I uploaded a script command called "PasteToFolders", which is able to paste any usable clipboard content to selected folders.
It seems it covers some parts of what is discussed here in this thread, in case you wanna give it a shot: Command: PasteToFolders (paste clipb. into multiple folders)

Hi all, I'm trying to insert script to paste a file to every first-level subfolder under a specific folder with the following:

Copy FILE="filepath" TO="folderpath"

Is there a way to only copy to the first level subfolders (many of them) underneath a specific folder? (I assume using a wildcard?) I tried a few variations but was unsuccessful...

If you don't like tbone's ClipboardEx you'll need a script that enumerates the target folder's subfolders.

Thanks, appreciate the feedback!