Command to list all files in a folder as well as sub-folders in windows

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Command to list all files in a folder as well as sub-folders in windows

Message par ForumBot »

Command to list all files in a folder as well as sub-folders in windows
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Command to list all files in a folder as well as sub-folders in windows

Message par ForumBot »

The below post gives the solution for your scenario.

```
dir /s /b /o:gn

```

**/S** Displays files in specified directory and all subdirectories.

**/B** Uses bare format (no heading information or summary).

**/O** List by files in sorted order.

Then in **:gn**, *g* sorts by folders and then files, and *n* puts those files in alphabetical order.
Répondre

Revenir à « Performance & Dépannage »