@echo off GOTO INICIOPRODUCAO :TESTE SET COUNT=0 :MyLoop IF "%COUNT%" == "100" GOTO EndLoop SET /A COUNT+=1 echo %COUNT% GOTO MyLoop :EndLoop goto fimTESTE :INICIOPRODUCAO cls SET N=0 echo "inicio" > txt2.txt for /D %%f in (*.*) do ( rem cd %%~pf%%~nf rem SET /A N+=1 rem SET CONTA=0 rem for %%f in (D:%%~pf%%~nf\*.mp3) do ( SET /A CONTA+=1 ) rem echo Total files: D:%%~pf%%~nf\*.mp3 %CONTA% %N% rem cd.. dir D:%%~pf%%~nf\*.mp3 > txt.txt echo D:%%~pf%%~nf\*.mp3 >> txt2.txt find "arquivo(s)" txt.txt >> txt2.txt ) :fimTESTE