I have a windows batch file that runs daily. Wish to log data into a file and want to rotate it (i.e. having at most the last 7 days worth of data).
Looked into the commands DATE
and DELIMS
- Cannot figure out a solution.
Is there a simple solution to create a file name that contains the day of the week i.e. 0 for monday etc.
Or do I have to resort to some better shell script.
DOW is 0 for Sunday, 1 for Monday, etc.
I Improved Aacini Answer to make it Echo Full day of week Name
So here's my Code
This works for me
This is not my work (well, I modified it slightly from the example), and it's late to the game, but this works on Server 2003 for me;
Citation: TechSupportForum