Windows batch script mp3 file count

Let’s consider the Windows batch script which calculates a number of mp3 files in the current folder.


mp3count.bat

@Echo Off
 
Set sum=0
Set folder=.
For /r "%folder%" %%i In (*.mp3) Do Set /a sum+=1
echo %sum%
 
Pause