1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

dir /s dies on my C: drive

Discussion in 'Support' started by old coot, Feb 26, 2013.

  1. old coot

    Joined:
    May 23, 2010
    Messages:
    4
    Likes Received:
    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.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     
  3. old coot

    Joined:
    May 23, 2010
    Messages:
    4
    Likes Received:
    0
    Mirabilis! Benigne facis! I gotta remember them options...
     

Share This Page