| 1. |
Solve : Can a bat file know the date?? |
|
Answer» I have a bat file that runs via Windows Scheduler every Sunday at 2 am. I'd like to add another command in the bat file to delete some log files, but I don't won't to do this every week - just once a month. Yes, I could set up another TASK, but I'd prefer to add the logic in the bat file itself so that this line only runs once a month. Can anyone help?!Yes, batch files are aware of the date thru the %date% variable (XP and Win2000), thru the PROMPT statement or thru the date command. |
|