copy files in several folders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zzjean
Posts: 32
Joined: 22 Nov 2009 14:56

copy files in several folders

Post 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 :)

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: copy files in several folders

Post 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


 

zzjean
Posts: 32
Joined: 22 Nov 2009 14:56

Re: copy files in several folders

Post 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

highend
Posts: 10151
Joined: 06 Feb 2011 00:33

Re: copy files in several folders

Post 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...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

zzjean
Posts: 32
Joined: 22 Nov 2009 14:56

Re: copy files in several folders

Post 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

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: copy files in several folders

Post 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!

PeterH
Posts: 2599
Joined: 21 Nov 2005 20:39
Location: Germany

Re: copy files in several folders

Post 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...)
W7(x64) SP1 German
( +WXP SP3 )

Post Reply