Finding day of week in batch file? (Windows Server 2008)
Posted
by
Daniel Magliola
on Server Fault
See other posts from Server Fault
or by Daniel Magliola
Published on 2009-12-16T05:41:52Z
Indexed on
2012/06/12
16:42 UTC
Read the original article
Hit count: 220
I have a process I run from a batch file, and i only want to run it on a certain day of the week.
Is it possible to get the day of week?
All the example I found, somehow rely on "date /t" to return "Friday, 12/11/2009", however, in my machine, "date /t" returns "12/11/2009". No weekday there.
I've already checked the "regional settings" for my machine, and the long date format does include the weekday. The short date format doesn't, but i'd really rather not change that, since it'll affect a bunch of stuff I do.
Any ideas here?
Thanks!
Daniel
© Server Fault or respective owner