I am trying to get today's date in DD-MMM-YYYY
format (for example, 12-JUN-2015) so that I can download a file from an FTP server that will be created daily.
i m using
@echo off
set month-num=%date:~3,2%
IF "%month-num:~0,1%"=="0" SET month-num=%month-num:~1%
FOR /f "tokens=%month-num%" %%a in ("jan feb mar apr may jun jul aug sep oct nov dec") do set mo-name=%%a
echo %mo-name%
it is giving syntax error
I would appreciate any advice, as I have no idea where to begin.