I've seen many methods of getting the day of week in a batch program. The following almost works while most of the others are for older systems.
for /f %%i in ('wmic path win32_localtime get dayofweek') do set wd=%%i
Does get the day of week but overrides it with space before it exits the loop. Iteration 1 is the literal day of week. Iteration 2 is the number 2 which i want but it does a third iteration which returns a space. When it exits the loop i have a space in the field wd. Anyone know how I can get at the answer I want?? Thanks
for /f %%i in ('wmic path win32_localtime get dayofweek') do set wd=%%i
Does get the day of week but overrides it with space before it exits the loop. Iteration 1 is the literal day of week. Iteration 2 is the number 2 which i want but it does a third iteration which returns a space. When it exits the loop i have a space in the field wd. Anyone know how I can get at the answer I want?? Thanks