dir /s dies on my C: drive

May 23, 2010
13
0
Note: This problem is solved, as far as I'm concerned. I just thought I'd report the symptoms and my workaround.

TCMD v11.00.52
TCMD v14.03.59 x64
C: SSD
D: HDD

I did a dir /s "*something*" on D:\; it worked fine. I did the same on C:\; TCC died. With v11, Windows gave me the "TCC has stopped working" dialog boxes. With v14, the TCC window just vanished with no warning.

This behavior was apparently caused by some circular directory pointers. (Darn Windows and its hidden virtual directories!) I had built a new PC, and had to install Windows a couple of times. The second time, I renamed C:\Windows to C:\windows.old, then did the install. When the dir command processed the C:\windows.old directory, I think it went into a loop on these virtual dir pointers.

I did a "move /s/a: c:\windows.old d:\windows-old-from-c\", but it also went into a loop (obvious, from the path names it was displaying), and eventually died. A Windows Explorer cut-and-paste of the directory worked fine. After that, I was able to do successful "dir /s" commands on both C:\ and D:\.

Comments/criticisms (even of the "you're an idiot" type) are welcomed.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
The /nj (no junctions) option should stop the circulus vitiosus, since only the use of junctions can create an infinite loop. It is part of my alias DIRS I use for displaying a directory tree. It still displays the directory which is a junction, and its target, but it does not display the contents of the junction and thus avoids the infinite loop.

Another method is to use the /Sn syntax to limit the depth to which it traverses the directory tree; it will display the chain of hidden links, but stops after displaying n levels of the hierarchy.

The same options are available for most commands that can handle directory trees, e.g., COPY, MOVE, TREE, and have been available in TCMD 11 already.
--
HTH, Steve
 
Similar threads
Thread starter Title Forum Replies Date
E Fixed Bug with DIR /Z displaying descriptions Support 8
J Paths shown in DIR /B Support 2
K Fixed Prompt display will be shifted after use dir to display a filename with Chinese. (v25.00.28 x64) Support 18
Jesse Heines How to? How to display picture creation date with dir command Support 6
vefatica WAD DIR.BTM? Support 11
DrusTheAxe DIR reports meaningless SYMLINK information Support 14
C show file description? with dir? Support 8
vefatica DIR /F and streams? Support 7
rps Multi-column DIR /v not displaying all files. Support 5
R How to? Dir specific file search patterns with spaces in the pathnames? Support 6
rps Dir /Nfv -> Alt-F2 Support 2
rps @FILESIZE[....,a] allocated size not matching Dir results Support 8
A TCMD - Dir Command puts out blank lines? Support 16
S Problems with dir command in the debugger Support 5
M TCC incorrect dir output since Windows 1803 Support 6
x13 Problem listing repository files using DIR http(s)://... Support 8
cxxl dir /s works in mysterious ways :( Support 4
vefatica Help nit (FFIND and DIR with /S) Support 0
N Fixed Strange dir behavior Support 6
JohnQSmith Weird DIR output (missing lines) Support 1
C 7zip with date range .vs. filelist created with dir and daterange Support 0
D Towards shared (dir-)history lists Support 3
vefatica WAD DIR /HL still gets names wrong Support 16
vefatica DIR /S /HL? Support 4
H Fixed DIR /G returns wrong sizes Support 2
nickles WAD dir.htm Support 2
vefatica DO dir in /s /a:+d /d"g:\" * ( ... ) Support 26
vefatica DIR \\.\...? Support 4
M Fixed DIR /S /B1 ignores "/S" Support 5
C tcmd.ini not loading from program dir? Support 5
D Fixed Dir /Nm:n has changed Support 1
rps How to? dir /s unexpected results Support 10
vefatica Update to current install dir? Support 8
cgunhouse Problem with "dir /=" Support 4
T dir /h error in empty directory Support 22
P WAD TC 15.0.1.58 x64 crasches with a simple dir command Support 18
CWBillow dir /4 strange Support 2
samintz WAD DIR /B1 and /X Support 2
nickles dir behaves inconsistently Support 5
vefatica DIR, streams, and wildcards? Support 1
vefatica DIR /: /u ... streams not counted? Support 7
vefatica Documentation DIR /B /S /: Support 2
samintz How to? DIR listing for exact match Support 1
dcantor WAD dir "ftp:// ..." fails in TCC 15 Support 7
T How to? dir/pdir - 2nd level down only Support 7
MikeBaas How to? DIR: supress extensions? Support 5
A WAD Dir daterange + multiple path wildcards crashes tcc Support 2
old coot TC DIR command has trouble on my SSD Support 2
M Fixed character set in dir/copy Support 3
C odd behavior of "dir" Support 0

Similar threads