How To: Create a Batch file Which will copy all the files from a directory to all the subdirectories
You all know batch programming, I hope. Its the easiest scripting language for windows. You can just automate so many everyday things in you computer using just batch scripts. Now I am not going into the details where batch programming can help you.
Here I give you the example code for a script which will take a user input for the Directory and copy all the files directly under the specified directory to all the subdirectories. Well you can change the script and make it useful for your own purpose.
so the code for it is:
:input
@ECHO OFF
set INPUT=
set /P INPUT=Input the folder: %=%
cd %INPUT%
for /f “delims=” %%i in (‘dir /ad/s/b’) do for /f “delims=” %%j in (‘dir /aa/b’) do copy “%%j” “%%i”
Related posts:
- How to: Change the default installation Location
- How to view CHM files or Microsoft Help files in Linux
- Youtube lets users to create their own iReports
Related posts brought to you by Yet Another Related Posts Plugin.


Nice script.
You may want to try biterscripting ( http://www.biterscripting.com ) – that’s another scripting language. It may provide more explicit control.