Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

pdir /s

Nov
257
3
I'm seeing a change in behaviour of pdir from v16 to v23: It seems that "pdir /s w:\directory" no longer returns any content from subdirectories, whereas if I omit w:\directory and let it act on the current directory then it does return content from subdirectories.

TCC 16.03.55 x64 Windows Server 2012R2 [Version 6.3.9600]
Code:
[W:\Software]pdir /s W:\Software | find ":" /c
10766

TCC 23.00.24 x64 Windows Server 2012R2 [Version 6.3.9600]
Code:
[W:\Software]pdir /s W:\Software | find ":" /c
103
[W:\Software]pdir /s | find ":" /c
10766

Is this an intentional change or a bug?
 
apparently, with v23, you need a trailing '\' when specifying a directory name. Here's v16.
Code:
c:\users> pdir /s | find ":" /c
16850

c:\users> pdir /s c:\users | find ":" /c
16850

c:\users> pdir /s c:\users\ | find ":" /c
16850

And here's v23.
Code:
c:\users> pdir /s | find ":" /c
16850

c:\users> pdir /s c:\users | find ":" /c
4

c:\users> pdir /s c:\users\ | find ":" /c
16850
 
I made a change for this in v21, but I can't remember *why* I changed it. My best guess at the moment is I needed to change DIR (which shares some code with PDIR), but I didn't make the corresponding change in PDIR. For some reason -- which could be because I forgot, or I had a real reason.

I'm going to have to ponder this for a day and look over my old notes to jog my memory.
 

Similar threads

Back
Top