其实可以更简单- @echo off & setlocal enabledelayedexpansion
-
- set total=0
- for %%i in (m4a,mp3,ape,flac,wav) do (
- set found=0
- for /R %%j in (*.%%i) do set /A found+=1
- set /A total+=found
- if not !found! EQU 0 echo 找到%%i文件!found!个
- )
- echo 共找到音乐文件%total%个
- pause
复制代码 扩展性也更好 |