Search found 3 matches

by macrome
25 Sep 2012 15:44
Forum: DOS Batch Forum
Topic: Batch add Previous Date to Filename
Replies: 2
Views: 4052

Re: Batch add Previous Date to Filename

This works so far, but I have not done extensive testing. Bulk of this code came from a script Wimmel posted here: http://stackoverflow.com/questions/355425/date-arithmetic-in-dos-scripting I've modified a bit to suit my needs. First I use wmic to get the day of the week, today being Tuesday it retu...
by macrome
25 Sep 2012 14:06
Forum: DOS Batch Forum
Topic: Batch add Previous Date to Filename
Replies: 2
Views: 4052

Re: Batch add Previous Date to Filename

I found that this works to get the DOW:

wmic path win32_localtime get dayofweek

I'll see if there is a way to take advantage of it
by macrome
25 Sep 2012 13:58
Forum: DOS Batch Forum
Topic: Batch add Previous Date to Filename
Replies: 2
Views: 4052

Batch add Previous Date to Filename

Hello, I would like to create a copy of a file, and rename it to include a date. Specifically I need the date that corresponds with the previous Sunday. Example: Today is Tuesday Sept 25th, the date I want to show would be Sunday Sept 16th. I am using the following code to add todays date: @Echo Off...