# Batch (DOS) File to create a folder with Current\_Date as name

**URL:** <https://forumautomation.com/t/batch-dos-file-to-create-a-folder-with-current-date-as-name/386>\
**Category:** Industrial Automation\
**Created:** [April 6, 2015, 5:18am UTC](https://forumautomation.com/t/batch-dos-file-to-create-a-folder-with-current-date-as-name/386 "2015-04-06T05:18:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denizen](https://forumautomation.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@denizen](https://forumautomation.com/u/denizen)\
**Post date:** [April 6, 2015, 5:19am UTC](https://forumautomation.com/t/batch-dos-file-to-create-a-folder-with-current-date-as-name/386/1 "2015-04-06T05:19:00Z")

</div>

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 .
