我是批处理编程的新手。我正在尝试在我的一个批处理脚本中使用 IF 条件。代码看起来像这样。
:rmfile
:: removes the file based on it's age.
::
SETLOCAL
set file=%~1
set age=%~2
set thrshld_days=40
if %age% LSS 40
echo.%file% is %age% days old
EXIT /b
现在的问题是,即使文件的年龄超过 40 年,我也会打印文件。这实际上不应该发生。
请在这方面帮助我..谢谢!