所以需要找批次檢查檔案,因此找到一個簡易的範例。
@echo off
setlocal
set file="test.cmd"
set maxbytesize=1000
FOR /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
if %size% LSS %maxbytesize% (
echo.File is ^< %maxbytesize% bytes
) ELSE (
echo.File is ^>= %maxbytesize% bytes
)







0 意見:
張貼留言