DOS Question

Poulsonator

Golden Member
Aug 19, 2002
1,597
0
76
Is there a way in DOS to copy a file to two (or more) locations by using just one command? For example, I have a homework assignment, and the teacher has asked us to copy a file from our C: drive to two locations on our floppy drive (A). Here's what I've tried, with no luck (and yes, I have to stay in the root of C):

C:\>xcopy c:\winnt\system32\ansi.sys a: a:\poulson\temp
C:\>xcopy c:\winnt\system32\ansi.sys a:;a:\poulson\temp
C:\>xcopy c:\winnt\system32\ansi.sys a:+a:\poulson\temp

As you can see, I tried a space, a semi-colon and a +. None of them work, so I'm just wondering if this is even possible with just one command.

Thoughts?
 

Cogman

Lifer
Sep 19, 2000
10,286
147
106
Depending on what you are using. I belive that the * command will work. xcopy randomprogram* should get randomprogram.exe and randomprogram.txt ect..
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
Originally posted by: Cogman
Depending on what you are using. I belive that the * command will work. xcopy randomprogram* should get randomprogram.exe and randomprogram.txt ect..

mmmm...no dude he doesnt want to wildcard it, he wants to copy the same file to two or more locations with the same command