In the newer MS Windows OS's, which includes Vista and Windows 7, the "date" command does not return a day of week but you can still put the day into a variable by using the following in a batch script:
@echo off & Setlocal
Set "_=mon tues wed thurs fri sat sun"
For /f %%# In ('WMIC Path Win32_LocalTime Get DayOfWeek^|Findstr [1-7]') Do (
Set DOW=%%#)
:: now lets display the day of week on the screen
echo "%DOW%"
pause
For Windows 2K and XP you can parse the day from the "date" command by using the following in a batch script:
@echo off
echo.|date|find "is:" >Get.bat
findstr "is:" get.bat > Str
for /f "tokens=5 delims= " %%d in (str) do set day=%%d
del get.bat
del str
:: echo day of week to the screen
echo Today is %day%
pause