Windows Batch: Format current date to filename/foldername friendly format


@echo off
rem Make Directory With Name Date and Time
for /f "tokens=1-4 delims=/- " %%a in ('date /t') do set XDate=%%d-%%c-%%b
echo %XDate%

Where:

%%a name of the day (Monday etc.)
%%b Day
%%c Month
%%d Year

Comments

Popular posts from this blog

How to make exrernal USB HDD available to the Synology Media center

How to loop "ipconfig /renew" until it gets IP address on remote PC to test DHCP using PowerShell

When users is trying to open PDF file from the internet using browser he gets following error message - Problem (1:1)