I have gone through the above thread. I have a specific requirement to count the files in a folder and set it's count value to a variable in the batch script. I will then use this value later in the program. e.g.
for /f "delims=" %a in ('dir /a-D /B /s "C:\code\depot\install\Data File Distrib\ProductName" |find /c /v ""') do Set tempVar=%a
I am having trouble with the space in the path. I tried using escape with slash '\' but didn't help. Can anyone correct my above command and get the count in the tempVar?
Its been too long since I have worked extensively with bat files but here is a link
that could be helpful.
http://commandwindows.com/ Maybe there will be something helpful in there for you.
I have tried your bat and I think the trouble lies in the find command.
While spending a short time in the above site I saw this and thought it could help
http://commandwindows.com/batchfiles-iterating.htm You may end up using the IF and Set commands to set a counter.
Ill try to get back after a while and see what else i can find.