Computing.Net > Forums > Programming > Copy to 2 Destinations

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copy to 2 Destinations

Reply to Message Icon

Name: pegzyisdeed
Date: June 7, 2009 at 19:02:37 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: June 8, 2009 at 02:16:04 Pacific
Reply:

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


0

Response Number 2
Name: Mechanix2Go
Date: June 8, 2009 at 04:43:05 Pacific
Reply:

Hi klint,

Thought you got lost.


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

M2


0

Response Number 3
Name: klint
Date: June 8, 2009 at 06:42:59 Pacific
Reply:

Hi M2,

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Copy to 2 Destinations

Delphi convert to 2 decimal places www.computing.net/answers/programming/delphi-convert-to-2-decimal-places/9810.html

Batch to search and copy to new Dir www.computing.net/answers/programming/batch-to-search-and-copy-to-new-dir/16809.html

dos copy files based on filename www.computing.net/answers/programming/dos-copy-files-based-on-filename/17353.html