回复 1# hkldd - @echo off
- set "TargetFolder=D:\Folder\To\Check"
- if not exist "%TargetFolder%" (
- set "TargetFolder=."
- )
- for /f %%i in ('dir /b /s /a-d "%TargetFolder%" 2^>nul ^| find /v /c ""') do (
- set "FileNum=%%i"
- )
- if %FileNum% gtr 80 (
- start "" "E:\Test\3.bat"
- ) else if %FileNum% gtr 50 (
- start "" "E:\Test\2.bat"
- ) else if %FileNum% gtr 30 (
- start "" "E:\Test\1.bat"
- ) else (
- start "" "E:\Test\0.bat"
- )
复制代码
|