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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy d:\*.txt /s into one single directory

Status
Not open for further replies.

ReTeMa

Technical User
Mar 11, 2005
31
SI
hi,

i have d: disk with directories and subdirectories. there are many *.txt files, probably with the same name in different directories.

i want (batch file?) to copy all *.txt files from whole disk d: into one single directory e:\txt - irrespective of eventually duplicate files (last one overwrite previous).

could someone help me? thanks
 
Create the directory you want, off of the H drive.

"xcopy h:\*.txt <yourcreated directory> /S

also add a /Y if you do not want it to prompt you to overwrite..

Computer/Network Technician
CCNA
 
robocopy is the best.

thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top