Microsoft
Software
Hardware
Network
Question : Windows Batch - Find Day of Week
Hi,
I have the below batch script to create the 'DOW' variable. However when I run it, it's choking on the 4th lineon the 'Command' part. Not sure what is wrong. Any help? Prefer to keep this Windows Batch. Running on Win Server 2003 R2.
REM Set the Day of Week (DOW) Variable
:: setDOW.bat
@echo off
Echo.|Command /C Date>DOW
set /p today=<DOW
set DOW=%today:~16,3%
echo DOW=%DOW%
:: DONE
Answer : Windows Batch - Find Day of Week
In a BAT file, this is all you should need:
@echo off
for /F "tokens=1" %%A in ("%DATE%") do set DOW=%%A
~bp
Random Solutions
Can't access Microsoft windows update website anymore?
How do I make Firefox prompt me for an application to open XML files?
infopath regular expressions
2nd DNS Entry for Exchange Client Access Server
How to export images from Access to Excel
Remove header from array created using Get-QADComputer cmdlet?
100% CPU usage in vCenter but not in taskmanager on the Windows NT 4.0 VM that has been converted
asp - The resource could not be found
what is the default directory to run jsp file from tomcat 5.5 and what directory for mysql_connector.jar file to be placed?
Problems installing the AjaxControlTooKit.dll