Count files of particular type using batch

Closed
Report
-
 Hawk -
Hello,

Does anyone know how to write a batch file that counts the number of xml files I have in the current directory?

Thanks in advance!

1 reply

Script for your question,

----------------
set /a count=0
for /f "tokens=* delims= " %%a in ('dir/s/b/a-d "path of the folder\*.xml"') do (
set /a count+=1
)

echo %count%
---------------------
variable "count" will give u the count...

-Pradeep
9
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month