Batch (DOS) File to create a folder with Current_Date as name


#1

This batch files can be used for saving of excel reports from one location to another at a scheduled time in the day. This batch first creates a directory with current date as name. then it copies your current report to that folder. This batch can be scheduled for a particular time in the day e.g. 06:00 am to generate the current day report.

for /f "tokens=1-4 delims=/ " %%i in (‘date /t’) do set todaydir=%%l%%j%%k
md d:\report%todaydir%
copy d:\a\a.txt d:\report%todaydir%\b.txt

Copy the commands to a notepad file and change the extension to .bat .