I'm trying to write a batch file to count the number of files within folders of a given directory and then print them to a text document. I have code that will show on the screen exactly what I want to see but can't seem to get the proper command to send it to a file.
what I have is
for /d %%a in (*) do (
<nul set/p =%%a
dir/b/a-d "%%a" 2>nul|find/c /v ""
I know the proper command is >>(filenameIwant.txt) but where do I put it? I know it's a pretty noob question but it's driving me nuts.
Thankyou in advance