Computing.Net > Forums > Programming > Copy files from mult. subfolders

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 files from mult. subfolders

Reply to Message Icon

Name: jakapoor
Date: July 28, 2005 at 16:50:20 Pacific
OS: XP
CPU/Ram: Intel
Comment:

Does anyone know how to copy files from multiple subfolders (under the same parent folder) to another directory using DOS commands? For example, if I wanted to copy all text files named *test.txt located in folders C:\A\1\, C:\A\2\, C:\A\3\, and paste them in C:\B\, is that possible?
Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: uli_glueck
Date: July 28, 2005 at 23:38:49 Pacific
Reply:

To Copy all *test.txt files in the same folder:

xcopy C:\A\1\*test.txt C:\B
xcopy C:\A\2\*test.txt C:\B
xcopy C:\A\3\*test.txt C:\B

If you want to copy files from all
subfolders
xcopy C:\A\*.\*test.txt C:\B

Check also if xcopy /s is useful for you.
It copies all subfolders with files in the
directory. (xcopy /?).

hope that helps

uli


0

Response Number 2
Name: jakapoor
Date: August 2, 2005 at 12:44:13 Pacific
Reply:

Works great,
Thanks!

J


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 files from mult. subfolders

script to copy files from a server www.computing.net/answers/programming/script-to-copy-files-from-a-server-/16825.html

Copying files from one driver hive to another www.computing.net/answers/programming/copying-files-from-one-driver-hive-to-another/18970.html

Xcopy command is not working www.computing.net/answers/programming/xcopy-command-is-not-working/17730.html