Windows下批处理返回今天是星期几保存下面的代码为:test.bat,执行后返回:It’s 周六 today
@ECHO OFF FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B ECHO It's %Today% today
Windows下批处理返回今天是星期几保存下面的代码为:test.bat,执行后返回:It’s 周六 today
@ECHO OFF FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B ECHO It's %Today% today