Categories
DOS & DOS Scripting

Creating a folder named for the current date

When automating a backup script, you may want to be able to create a folder named with the current date.

This quick line will accomplish that;

1
2
@echo off
md %date:~-4,4%-%date:~-10,2%-%date:~-7,2%

Leave a Reply