The following command can be used in the command prompt or batch file to find the day of the week and then do a check against that day to do another command:
for /F “tokens=1” %i in (‘date /T’) do @echo %i
You can then check if the day matches using an IF statement, such as the example below, which does something if the day is Friday:
for /F “tokens=1” %i in (‘date /T’) do @echo %i
IF %i=Fri(
goto FRIDAY)
ELSE(
goto ANOTHERDAY)
:FRIDAY
:ANOTHERDAY