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
DOS Batch script to Copy/Delete Files with Date in File Name
port 443 closed
When closing Excel several computers are getting an error
Get the values of a cell in a selected row of a RadGrid on client Side
admin rights to IIS for a User
Manageing Multiple Time Zones in GoldMine CRM
How can Broadband access be split between 2 ISPs?
How to block web proxys like ninjacloak.com?
How to hide a dummy date value.
vcenter Agents for ESX server