Code: Select all
FOR /D %%a IN (C:\Documents\%DATE:~-2%%DATE:~-2%\Reports\ /b report1.eom.*.000) DO (monarch commands with %%a as my file to import)
Moderator: DosItHelp
Code: Select all
FOR /D %%a IN (C:\Documents\%DATE:~-2%%DATE:~-2%\Reports\ /b report1.eom.*.000) DO (monarch commands with %%a as my file to import)
Code: Select all
echo %DATE:~-2%
Code: Select all
for /f "delims=" %%a in ('dir /a-d /b "C:\Documents\%DATE:~-2%%DATE:~-2%\Reports\report1.eom.*.000"') do echo %%a
dssrun wrote:I use the date format that way because that was the only way I figured out how to get the date like 020111 (that is how are new folders are named monthly).
Code: Select all
echo %Date:~-2%
Code: Select all
echo %date:~4,2%%date:~7,2%%date:~-2%
Code: Select all
echo %date%