Yes, GLOBAL would also need "/I" (ignore errors).
On Wed, 09 Nov 2011 21:14:47 -0500, mathewsdw <> wrote:
|---Quote (Originally by vefatica)---
|On Wed, 09 Nov 2011 18:09:16 -0500, mathewsdw <> wrote:
|
|Code:
|---------
|v:\> set count=0
|
|v:\> global /q /h set /a count+=1 > NUL
|
|v:\> echo %count
|20
|---------
|---End Quote---
|Vince, this is another clear-cut case of "I don't understand at all.". I would think that your suggest would work, but on my system on the Z: drive the result is "", whereas the correc answer is (provably! I can attach said proof in a zip file in a later reply if that is anyone's desire) "156". (The difference of exactly "100" is really strange, in my opinion. Maybe it's because the "GLOBAL" command aborts when it hits ""Z:\System Volume Information"". "TCC: (Sys) Access is denied.") However, another post in this thread seems to have provided me with the answer (it uses the "dir" command's "/U2" parameter, which I was not aware of), and said answer is a user-defined function, which is exactly what I want.