作者: cpn 時間: 2017-9-24 14:55 標題: windows bat for loop list file and count
我想問在windows bat之中,用for loop列出並顯示指定檔案路徑之餘還計算數目。
作者: ROM 時間: 2017-9-25 00:07
http://lmgtfy.com/?q=windows+bat+for+loop+list+file+and+count
作者: procapitalist 時間: 2017-9-25 00:11
本帖最後由 procapitalist 於 2017-9-24 16:19 編輯
- for /f "delims=" %a in ('cd') do @for /f %b in ('dir /b /a') do @echo %a\%b
- set count=0 & for %x in (*) do @(set /a count+=1 >nul)
- echo %count%
Source:https://serverfault.com/question ... n-current-directory

