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
jquery validator and asp.net updatepanel
How do I get the F6 storage drivers to work on a 8100 Elite Convertable Mini Tower?
Page progress updates from a long running process
Office 2003 - dollar sign shows up as an arrow
iPhone Exchange Emails
DHCP service failed to see a directory server
Exchange 2010 setup.com /preparead fails
Dell PowerEdge Perc 4e/Di RAID 1 expansion
Oracle Join null rows.
asp.net vb.net render html to component