Windows 10: DOS Dir Command issues-dir *. /s doesn't get all subfolders?

Discus and support DOS Dir Command issues-dir *. /s doesn't get all subfolders? in Windows 10 Software and Apps to solve the problem; I am trying to get an accurate picture of my music library, where all music is stored in album subfolders under artist folders. I opened a CMD window... Discussion in 'Windows 10 Software and Apps' started by RichardReithner, Jun 14, 2020.

  1. DOS Dir Command issues-dir *. /s doesn't get all subfolders?


    I am trying to get an accurate picture of my music library, where all music is stored in album subfolders under artist folders. I opened a CMD window and at "E:\My Music\" prompt, typed: "dir *. /s" >dir.txt" in order to generate a text file of all folders and subfolders under "My Music". When I reviewed the dir command output I found some cases where the folder name is omitted from the higher level output but appears in the lower level. So it would look like this:


    My Music\ABC


    My Music\ABC\123

    My Music\ABC\456

    My Music\ABC\789


    My Music\ABC\123\aaa

    My Music\ABC\123\bbb

    My Music\ABC\123\ccc


    My Music\ABC\456\aaa
    My Music\ABC\456\bbb

    My Music\ABC\456\ccc


    My Music\ABC\789\aaa

    My Music\ABC\789\bbb

    My Music\ABC\789\ccc

    My Music\ABC\012


    My Music\ABC\012\111

    My Music\ABC\012\222

    My Music\ABC\012\333


    As you can see, the problem is that a level of subfolder is omitted from the top level of the DIR output, despite the fact that it is shown in the lower down levels of the DIR output. "My Music\ABC\012" should have been at the bottom of the first section of the DIR output, below the line "My Music\ABC\789". It will make it much easier if I could get a consistent output from my DIR command. By the way, I did check to see that the affected files and folder didn't have Hidden attribute. Also, so far, this has only affected about 2 out of around 30 folders, really have no idea what to do to fix this.

    :)
     
    RichardReithner, Jun 14, 2020
    #1
  2. Kari Win User

    dir Difficulties

    DIR uses whatever time definition you tell it to use. Following command would list all files and folders in X:\Downloads in order they have been created:

    dir X:\Downloads /t:c


    DIR is fully capable to sort files and folders. Following command would list all files in X:\Downloads, oldest first:

    dir X:\Downloads /o:d

    The minus sign before a parameter reverses the results, so the following command would list the same folder in reversed order, newest first:

    dir X:\Downloads /o:-d

    You can also combine switches. Following command would list all files and folders in X:\Downloads and all its subfolders (the /s switch), listing them in newest first based on time of file / folder creation:

    dir X:\Downloads /s /o:-d /t:c
     
  3. dir Difficulties

    I am getting the hang of this command set.

    Maybe somebody know a work around that will list the three time stamps at one time.
    Theoretically dir /TC /TA /TW.
    dir will only show one of the three at one time.

    To me it seems that the only way to get all three on a line is to run loop with output to file, then boiling down the three outputs to one line. Clumsy but maybe the only way to get the job done?

    Thanks for any suggestions.
     
    mikeincousa, Jun 14, 2020
    #3
  4. DOS Dir Command issues-dir *. /s doesn't get all subfolders?

    list contents similar to Dir command by Windows built in "Kind"

    I've been searching for a way to print a listing of folder and subfolders and only want a certain kind, based on Windows built in "Kind" associations.

    I know how to do the dir command to print a listing of a folder and how to use the dir command to list only a certain type.

    What I am hoping for is someone out there might know of a way to make a printout or a file of the listings of a certain "kind" based on the associations that are setup in Windows.

    For example, if you use Explorer to search, you can by kind (Documents, movies, videos, music, etc), or type (*.exe, *.avi, *.mp3, *.txt, *.doc, etc)

    I've tried to search using various terms here, on Bing, Google, etc and it's just not taking me anywhere that might give me help. I've even looked for powershell scripts someone might have posted to do the job.

    Prefer to not install 3rd party software to do the trick but use Windows built in solutions but am open to suggestions as a last resort.
     
    Paul_W_Chambers, Jun 14, 2020
    #4
Thema:

DOS Dir Command issues-dir *. /s doesn't get all subfolders?

Loading...
  1. DOS Dir Command issues-dir *. /s doesn't get all subfolders? - Similar Threads - DOS Dir Command

  2. "dir/s/b" Command Prompt not picking-up all the files in a directory.

    in Windows 10 Gaming
    "dir/s/b" Command Prompt not picking-up all the files in a directory.: I'm using the command in Command Prompt that goes "[a directory] > dir/s/b > [to a text-file]". When applying this to certain folders in the Windows OS—"C:\Users\Administrator\""C:\ProgramData\Packages\""C:\Windows\ServiceState\"in particular—it doesn't manage to get the...
  3. "dir/s/b" Command Prompt not picking-up all the files in a directory.

    in Windows 10 Software and Apps
    "dir/s/b" Command Prompt not picking-up all the files in a directory.: I'm using the command in Command Prompt that goes "[a directory] > dir/s/b > [to a text-file]". When applying this to certain folders in the Windows OS—"C:\Users\Administrator\""C:\ProgramData\Packages\""C:\Windows\ServiceState\"in particular—it doesn't manage to get the...
  4. DIR Command

    in Windows 10 Gaming
    DIR Command: dir /A:D /B /S > FolderList.txt produces a list of all directories and subdirectories of a directory. I would like to modify this line to have the date included for all directories and subdirectories of a directory too....
  5. DIR Command

    in Windows 10 Software and Apps
    DIR Command: dir /A:D /B /S > FolderList.txt produces a list of all directories and subdirectories of a directory. I would like to modify this line to have the date included for all directories and subdirectories of a directory too....
  6. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Customization
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  7. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Gaming
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  8. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Software and Apps
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  9. Bug in the DIR command?

    in Windows 10 Network and Sharing
    Bug in the DIR command?: Hi all. I'm running Version 10.0.17134.1365 and recently I've been testing long file names and how they're handled in an application that I work on. Strangely I noticed that when I try to see what the short name is for one of these files, they're not displaying correctly....
  10. DIR commands

    in Windows 10 Ask Insider
    DIR commands: So recently I used the DIR commands to be able to see hidden and Invisible files, is there any way to revert this? submitted by /u/Creeper_King_558 [link] [comments] https://www.reddit.com/r/Windows10/comments/inyfq2/dir_commands/