批处理如何让if语句在不执行其后语句时忽略判断其正确性?

2024-11-20 14:39:25
推荐回答(1个)
回答1:

@echo off if exist date.txt del date.txt date /T >date.txt for /f "tokens=2" %%W in (date.txt) do set Week=%%W if "%Week%"=="星期一" goto noparms goto end :noparms copy c:\test.txt d:\ exit :end del date.txt del c:\test.txt exit 注意大小写。里面是区分大小写的