Yep, that did the trick.
1. I wonder why you must use the redirection twice. I mean, if you use NO redirection, it all appears on the screen fine. One would think, one redirection would render the screen results into the text file ...
2. Another thing I noticed is that if you move some files with explorer let's say, and you run this again soon after, the number of files does NOT update. You have to re-run it to get the right number. Is this because the system did not refresh fast enough?
Thanks a lot.
Path inclusion in Dir
Moderator: DosItHelp
Re: Path inclusion in Dir
See the following commands:
Here you see every command of set and the result of the command set.
Here you see any result of the command set.
Here will you not see any result of the command set. What you see is only the last result that save in num.
The result of the command set will not display at the screen with the ">nul".
The result is going to the NULL device (nowhere).
Here you see every command of set and the result of the command set.
Code: Select all
(set num=0) & (for /l %a in (1,1,10) do set /a num+=%a)
Here you see any result of the command set.
Code: Select all
(set num=0) & (for /l %a in (1,1,10) do @set /a num+=%a)
Here will you not see any result of the command set. What you see is only the last result that save in num.
Code: Select all
(set num=0) & (for /l %a in (1,1,10) do @set /a num+=%a >nul) & (echo %num%)
The result of the command set will not display at the screen with the ">nul".
The result is going to the NULL device (nowhere).