How can use dir command to check how many .txt files there are in a folder (for example,
At the command prompt, or in the batch script, type this:
dir|find /c ".txt"
This will get a list of all the txt files in the folder...
For ways to get a count of all types of files in a folder look here: