How To Automatically Create A Text Document Directory Listing Of Any Folder In Windows
- Click the Windows Start Menu Orb and Type in cmd. Once the program link appears, Right-Click cmd.exe and Select Run as administrator.
2. In the command prompt that is displayed, Navigate to the correct folder you want. Navigation is relatively simple, just type “cd” (change directory) and then the local location of the folder on your computer. For example, if I wanted to go to c:Program Files, I would just Type:
3. Once command prompt is at the folder you want a directory of Type in the following: Tip: Add /b like in the screenshot below if you don’t need file details such as size, or date to be included.
The Result A file named Directory.txt is created and placed in the same folder where you just queried a directory.
Inside of Directory.txt will be a complete list of every file within the queried location. In this example I have a HUGE list of every folder and file in c:program files and the list gets even bigger as it contains every content of every folder within every folder and each file in those. In this way, you can view every single file from any parent location in Windows in an organized and printable format.
The Tree Alternative If you are more of a visual person, then the tree format may better suit your needs. This command works similar to the above one. Just follow the above instructions, but at Step #3 rather than typing “dir /s> Directory.txt” instead Type:
The Tree Result A Tree.txt file will be generated and placed in the same directory. This Tree format will display the same information as the other Directory, but it will be organized similarly to the way keys show up in the Windows Registry Editor. From here you can print or email the organized content list quickly. Groovy eh?
The Prompt (DOS) Commands Explained Questions, Thoughts? Post a comment below and check out the free groovyPost RSS feed for daily tech-related tips, how-to, and news. I am in no affiliated with VoidTools, just a very happy user. I used to use tricks like your article explains, but now with EveryThing you can quickly find (by pattern) any file on your system very quickly. rp HKCR,”Drive\Shell\Command Prompt Here\command”,,,”%11%\cmd.exe /k cd “”%1″”” HKCR,”Directory\Shell\Command Prompt Here\command”,,,”%11%\cmd.exe /k cd “”%1″”” ; Add “command-prompt-here” functionality when right-clicking a directory HKCR,”Folder\Shell\List Contents to text file\command”,,,”%11%\cmd.exe /C DIR “”%1″” /B /O /S>””%1″”””_contents list.txt””” Thanks again! ;-) Comment Name * Email *
Δ Save my name and email and send me emails as new comments are made to this post.