Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

files copy from network fs 1

Status
Not open for further replies.

inunix

Technical User
Jul 30, 2002
53
US
I need to copy all txt files from a dir and it's subdirectories to my local disk.

How can i do that...?

say i've a folder call "aaa";
underneath there are lot of subfolders, each subfolder have 'n' number of files(including one txt file). I need to transfer only the txt file from all the subfolders of "aaa" to my local disk.

 
Assuming your text files all have same extension (eg, .txt), and all have different names, you could use xcopy (run xcopy /? at command prompt for parameters - there are a number of xcopy experts on these forums, so one may give you exact syntax). Or find xxcopy (freeware, with more options than xcopy) on the net.

If some duplicate filenames in the subfolders, you'll need a more programmed approach (eg, use a for statement) - again there are a number of experts in this here too.

If you need a more detailed replay and get none here, try the 2k & XP forums (more people use them, and commands similar to NT)
 
Thanks wolluf, Now I've opened the same in 2K forum also.
 
In this instance, the DOS XCOPY syntax would be (assuming your files were on D: and you wanted to copy them to C:) :-

D:\AAA:>xcopy *.txt C:\AAA\*.* /s

This will copy all txt files from D: to C: and place them in the same directory structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top