
批處理如何遍歷目錄獲取文本個(gè)數(shù) 現(xiàn)在指定目錄下獲取文件個(gè)數(shù) 麻煩幫我看下為什么輸出是0 怎么改可以得到預(yù)期效果
nclick="copycode($('code0'));">復(fù)制代碼
- echo off
- setlocal
- set inputDir = C:99Pursey
- set /a num = 0
- for %%m in ( dir /s /b %inputDir%*) do (
- if not %%m == test.bat (
- echo %%m
- set /a num = num + 1
- )
- )
- echo total num :%num%
- endlocal
- pause

