Computing.Net > Forums > Disk Operating System > Copy to XX

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Copy to XX

Reply to Message Icon

Name: spaceman
Date: December 5, 2002 at 12:26:08 Pacific
OS: w2k
CPU/Ram: 64
Comment:

I want to copy like this:

copy file.txt \\XXbdc\share\file.txt

where XX must be replaced from a list like this:

AA
AB
AC
etc.

Can this be done i a batch-file?
(sorry my bad english!)




Sponsored Link
Ads by Google

Response Number 1
Name: elric
Date: December 7, 2002 at 00:58:44 Pacific
Reply:

G'day,
Not totally sure about this but try using the %1 %2 etc operators.

Like, the content of your batch file- filename.bat -would be:
copy file.txt \\%1bcd\share\file.txt

Command line would be filename XX.

You could also replace file.txt with
copy %1.txt \\%2bdc\share\%1.txt.

Command line would now be:
filemame file XX

Just remember that they are in order ie %1 %2 etc, and that if you use spaces in XX then they become two variables.

Give it a go,

regards,
Peter


0
Reply to Message Icon

Related Posts

See More


Date Manipulation Doofus Zone



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Copy to XX

how to copy disk to hard drive dos www.computing.net/answers/dos/how-to-copy-disk-to-hard-drive-dos/14350.html

Can't copy to A:\ www.computing.net/answers/dos/cant-copy-to-a/13515.html

Script to copy and create Unique name www.computing.net/answers/dos/script-to-copy-and-create-unique-name/10735.html