Windows: Create a Text File with a List of All Directories and Files on a Disk

The command below–executed at a Windows command prompt–will list all directories, subdirectories and files on a drive, and then write that to a text file.

dir /s G: > G:\files.txt

Post Revisions:

Leave a Reply