>It's common knowledge how to copy several files into another
>directory, while concatenating those files. BUT can someone please
>tell me how, with MS-DOS (v.5.1.2600) how to copy multiple files into
>another directory without combining them?
While in the same directory where the files are, type
copy *.* <destination directory path>
you can substitute the file extension for the star if trying to copy
specific types of files while leaving some untouched.
If you're in a different directory, you'll need to type the full
directory path name starting with the drive letter in addition to the
*.* etc.
ie. copy c:/dir/subdir/subsubdir/*.* <destination>
--
Therese Shellabarger / The Roving Reporter - Civis Mundi
tls...@concentric.net / http://tlshell.cnc.net/
TO tlshell:
Maybe I'm, like, unbelievably dense, but it seems like you're
making the huge assumption that the files which are to be copied into
another directory are THE ONLY FILES in their present directory.
Knowwhutahmean? I mean, sure you can use wildcards to 'scoop up' all
the files in a directory, but what if you're in the root of C:\ drive,
for example, and there are a 100 files in there, but you only want to
copy 3 or four of them into another directory? Assume that there are 2
files you want to copy, "example1.txt" & "example2.txt", and that
they're at present in "C:\", and that you'd like to copy them to
"C:\new folder"....If you are already in C:\, what exactly is the
syntax to use to copy them??? I've been trying this at the prompt:
copy "example1.txt" "example2.txt" "c:\new folder". And windows keeps
telling me that the syntax is incorrect. Can you help???
To copy specific files you'll need to use a FOR loop. I'll assume,
for the purpose of this example, that there are a few patterns in addition
to a few specific filenames, and that the destination path is C:/DEST/.
C:
MD \Dest
CD \Source
For %X in (*.arj ap??.dbf license.dat) do Copy %X C:\Temp\Dest
Within a "For" loop you can include any number of filenames or file
patterns, each delimited by a space. The variable "%X" can actually be any
letter of the alphabet.
Try the following command for another example of the "For" command:
For %X in (0 1 2 3 4 5 6 7 8 9) do Echo Number %X!!!
When using the "For" command in a batch file, you'll need to use two
percent signs instead of one (e.g., "%X" will have to be changed to "%%X").
I hope this is helpful to you.
--
Sir Randolf, noble spam fighter - r...@8x.ca
Vancouver, British Columbia, Canada
Please do not eMail me directly when responding to
my postings in the newsgroups.
Sending eMail to other SMTP servers is a privilege.
> To copy specific files you'll need to use a FOR loop. I'll assume,
> for the purpose of this example, that there are a few patterns in addition
> to a few specific filenames, and that the destination path is C:/DEST/.
>
> C:
> MD \Dest
> CD \Source
> For %X in (*.arj ap??.dbf license.dat) do Copy %X C:\Temp\Dest
>
> Within a "For" loop you can include any number of filenames or file
> patterns, each delimited by a space. The variable "%X" can actually be any
> letter of the alphabet.
>
> Try the following command for another example of the "For" command:
>
> For %X in (0 1 2 3 4 5 6 7 8 9) do Echo Number %X!!!
>
> When using the "For" command in a batch file, you'll need to use two
> percent signs instead of one (e.g., "%X" will have to be changed to "%%X").
>
> I hope this is helpful to you.
TO SIR RANDOLPH:
Thanks very much [:-) That's just what I was looking for!
Terry B.
>Assume that there are 2
>files you want to copy, "example1.txt" & "example2.txt", and that
>they're at present in "C:\", and that you'd like to copy them to
>"C:\new folder"....If you are already in C:\, what exactly is the
>syntax to use to copy them??? I've been trying this at the prompt:
>copy "example1.txt" "example2.txt" "c:\new folder". And windows keeps
>telling me that the syntax is incorrect. Can you help???
literally, copy e*.txt c:\new folder
No quotes
Otherwise for dissimilar names, type: copy example1.txt c:\new folder
Repeat as needed.
You're welcome.
Please don't hesitate to post any other questions.