Batch Files

DylanHaskin

Well-Known Member
Joined
Dec 22, 2009
Messages
100
I need a batch file to duplicate a folder structure(only the folders), as well as copy any .exe and .ini files in that directory. It can be two separate batch files - don't really mind. One to create the folder structure and one to copy only .exe's and .ini's.

Any help will be much appreciated!
 

Slootvreter

Honorary Master
Joined
Aug 7, 2008
Messages
30,273
You can do it with xcopy. Just check the command line options and work it from there.
 

battletoad

Expert Member
Joined
Mar 10, 2009
Messages
1,451
Useta work in dos 6.22 back in the day not sure nw but:
Xcopy *.exe [target folder, eg c:\temp\] /s

That should copy all exe's (including exe's in the subdirectories, lol remember when folders were called directories?:) Showin my age i guess) into their corresponding folders. Rinse and repeat for ini's if it worx
 

Conradl

Expert Member
Joined
Dec 10, 2008
Messages
2,629
Xcopy is good, robocopy is better. If you want an even easier option use Richcopy. It has GUI, and an option to output all your selected options to a command line for use in a batch file. You can use it to set filters to only copy what you want.
 

Slootvreter

Honorary Master
Joined
Aug 7, 2008
Messages
30,273
Xcopy is good, robocopy is better. If you want an even easier option use Richcopy. It has GUI, and an option to output all your selected options to a command line for use in a batch file. You can use it to set filters to only copy what you want.

True. Hahah when i see batch file, I think native DOS command :p
 
Top