I need to write a dos batch that works both in Winodws XP and 7 that displays the date when a file was last modified in the format (dow, dd-mm-yyyy). I succeeded to write the code that returns the date in the format dd-mm-yyyy, but I can’t find out how I can add the day of the week.
This is the code that I’m currently using, that returns e.g. “06/04/2012”
FOR %%a in (c:\DB\inventory.txt) DO SET fileDate=%%~ta
msg * File last modified on %fileDate:~0,10%
I’d like instead to have as output “Fri, 06/04/2012” or even better “Friday, 06/04/2012”
Any help is greatly appreciated!!!
The script is untested and depends upon your Date format being dd/mm/yyyy