I am trying to make a script that will make a copy of a folder (on Windows) every day for the past 7 days. On day 8, I want him to take the oldest copy and overwrite it, etc. And so on, so at any time I will have a 7-day "history" of the folder.
Now I did this earlier on Linux, just telling the daily bash script to copy the folder to "/ home / whatever-date +% u".
date +% u by the way displays the day of the week. 1 for Mon, 2 for Tue, etc.
In comparison, the DOS date command is completely late. Is there an easy way to get the day of the week (numeric value) in a DOS batch file, or do I just refuse and write this in Java?
source
share