2
1
I need to do a command that takes yesterday date and builds it into a file path like this:
copy "Something 2010-12-06\*.zip" "d:\Copy\"
where 2010-12-6 is yesterday's date in format yyyy-mm-dd.
Based on link in answer, I found this solution, which is close to what I want, but not quite:
For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set cdate=%%c-%%b-%%a)
echo "Backup Set*\Backup Files %cdate% *\*.zip"
This give me today's date, How can I get yesterday's date?
This only works if the regional settings display the date as: dd/mm/yyyy – Hydaral – 2011-07-12T01:06:36.173