Every day after midnight I have to copy log file from day before.
Log names are in format exYYMMDD.log. So today (22.10.2011) I would have to copy file named ex111021.log into some directory.
Is it possible to do it in batch script? If not I could use powershell but would prefer not as it is not installed on my server.
Edit: With help of Siva Charan I created this (polish win7 - echo %date% prints YYYY-MM-DD)
set /a yest_Day = %date:~8,2%-%var:~-2,1%
copy ex%date:~2,2%%date:~5,2%%yest_Day%.log targetDir