Copy to 2 Destinations

June 7, 2009 at 19:02:37
Specs: Windows XP
Hi All,

I've created a nice little Batch file which works like a dream. I'm bascially connecting to a machine remotely and zipping up a log file and then copying it locally. Pretty simple stuff (even though it took me weeks).

My question is, can I copy 1 source file to 2 destinations.

I've got this
copy \\%machine%\D$\tmi\mfws\logs\newlog.zip "c:\new\logs\"

which works fine, but I cannot add this,

copy \\%machine%\D$\tmi\mfws\logs\newlog.zip "c:\new\logs\" + "z:\logs1"

I've tried a number of varriations however I cannot seem to copy to more than 1 destination. Help as ever is appreciated.


See More: Copy to 2 Destinations

Report •


#1
June 8, 2009 at 02:16:04
You need to use the copy command twice:

copy \\%machine%\D$\tmi\mfws\logs\newlog.zip C:\new\logs
copy C:\new\logs\newlog.zip z:\logs1


Report •

#2
June 8, 2009 at 04:43:05
Hi klint,

Thought you got lost.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#3
June 8, 2009 at 06:42:59
Hi M2,

Still clinging on but very busy at work. Nice to hear from you.


Report •

Related Solutions


Ask Question