- if "%intro.txt%" == "1" (
- for %%I in ("intro.txt") do (
- for /f "tokens=1*delims=rR" %%J in ("-%%~aI-") do (
- if not "%%K"=="" (
- echo intro.txt 已添加已读属性
- ) else (
- set intro.txt=0& call :TEMP
- )
- )
- )
- )
复制代码 用call 或 goto,嘿嘿呵呵- if "%intro.txt%" == "1" (goto :Main) else exit
- :Main
- for %%I in ("intro.txt") do set var=%%~aI
- if "%var:r=%" neq "%var%" (echo intro.txt 已添加已读属性
- ) else set intro.txt=0& call :TEMP
复制代码
|