Command to list all files in a folder as well as sub-folders in windows
Command to list all files in a folder as well as sub-folders in windows
Command to list all files in a folder as well as sub-folders in windows
Re: Command to list all files in a folder as well as sub-folders in windows
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.
```
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.