Page 1 of 1

copy files in several folders

Posted: 09 Jun 2015 11:45
by zzjean
Hello,
I wonder if I can copy files in different folders in the same time.

EX : I have a file F and I like to copy it in folders A, B and C just with one command.

Is that possible ?

Thank You

Sorry, my English is really bad :)

Re: copy files in several folders

Posted: 09 Jun 2015 11:57
by Stefan
How do you like it to work?

Select one file and execute a script to copy it to always the same three folders?
or
Select one file and execute a script to be asked to copy it to "up to three different folders"?
or


 

Re: copy files in several folders

Posted: 09 Jun 2015 12:01
by zzjean
Stefan wrote:How do you like it to work?

Select one file and execute a script to copy it to always the same three folders?

 
The first item. I have some files and I always copy them to the same 3 folders

Re: copy files in several folders

Posted: 09 Jun 2015 12:31
by highend
E.g.:

Code: Select all

$dstFolders = <<<>>>
D:\test\1
D:\test\2
D:\test\3
>>>;

    setting "BackgroundFileOps", 0;
    $items = get("SelectedItemsPathNames", "|");
    if !($items) { status "No items selected, aborted...", "", "stop"; end 1==1; }
    foreach($folder, $dstFolders, "<crlf>") {
        if !(exists($folder)) { new($folder, "dir"); }
        copyto $folder, $items;
    }
You have to edit the three lines in $dstFolders and put your three folders in...

Re: copy files in several folders

Posted: 09 Jun 2015 14:05
by zzjean
Thank you - it's exactly what I want. It work perfectly

If I had to do this myself it would take me 3 days :biggrin:

Vous êtres vraiment sympa - merci

Jean

Re: copy files in several folders

Posted: 14 Jun 2015 02:01
by Papoulka
I use the free utility "n2ncopy" for this. Per Google this may still be available on Sourceforge.

You can use its selector boxes, or just drag & drop eg. from XY. Drag the filenames you want copied into the left window and the target folder names into the right window. Click the Copy button - et voila!

Re: copy files in several folders

Posted: 14 Jun 2015 10:42
by PeterH
Hm...

If you wish you could change the above script to
- define multiple folder lists
- start execution by asking which list to use

expand it by
- if selecting "Dynamic" (instead of predefined list) ask for selection of multiple destinations [ inputfolder() in a loop]
- maybe storing them as list for later re-use
- and copying to this list.

So why use an external product?
(If you need it at all...)