This is very handy if you are using scripts to generate daily logs and would like to put them in a folder with the current date. You can, of course, tweak the commands to suit your requirements:
for /F “tokens=1-4 delims=/ ” %%A in (‘date /t’) do (
set DateDay=%%A
set DateMonth=%%B
set DateYear=%%C
)
set CurrentDate=%DateDay%-%DateMonth%-%DateYear%
md %CurrentDate%
This will give you a newly created folder with today’s date, in the format of DD-MM-YY
Hi, I am not a programmer and wanted to use this code, but how I could incorporate in on my windows command (right click, etc). Thanks