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

File copy to multiple directories

Status
Not open for further replies.

paddy138

IS-IT--Management
Apr 18, 2002
13
0
0
US
Maybe I'm losing my mind, but is there a way to copy a file from one directory into multiple subdirectories through a batch file.
I.E.;
Main directory called /app. In this directory is a file called test.txt. I want to copy this file to a large group of subdirectories, these directories belonging to users of this app (200+ directories) without having to type each subdir's name.
 
You could do something like dir 'maindirectory' /AD > dirs.txt - this should give you list of subdirectories in text file. Then can multiple edit this file (assume you have decide text editor) to produce batch to copy your source file to all target dirs.
 
See, I could produce that directory list, but the sub directories constantly change, so there may be more or less each time I run this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top