我有一个用于toad自动化的批处理文件。批处理文件应该足够简单,但它不喜欢if状态,出于某种原因,我甚至尝试了GTR示例,但遗憾的是,我在if语句上得到的结果是语法不正确,并且不知道为什么。
@Echo off
Set _File=ExportDiffFile.csv
Set /a _Lines=0
For /f %%j in ('Find "" /v /c ^< %_File%') Do Set /a _Lines=%%j
REM Echo %_File% has %_Lines% lines.
if "%_Lines%"=="1"(
Echo %_File% has no new lines.
Echo 100.
REM exit 100
)
else
(
Echo %_File% has %_Lines% new lines.
Echo adding into the server.
REM exit 0
)
https://stackoverflow.com/questions/51774483
复制相似问题