Written by Allen Wyatt (last updated August 12, 2019)
As you start storing things on a hard drive, the structure of that drive can quickly become quite complex. You can end up with directories within directories within directories. If you want to create a "roadmap" that shows you the hierarchy of your hard drive, there's an easy way to do it.
cd \ tree /a /f > mydrive.txt
Doesn't seem like much, does it? The first command line changes to the root directory for your hard drive. The second one generates a "tree" of your hard drive structure and stores the output in the file named mydrive.txt. This file was created in the root directory for the hard drive, and you can use Windows Explorer (Windows 7 and Windows 8) or File Explorer (Windows 10) to navigate to that directory and open the file.
If you don't want a hierarchy for your entire hard drive, you can limit what is generated by the TREE command. You do this by using command-prompt commands, in step 2, to navigate to the directory you want to use as the beginning point for the hierarchy. The mydrive.txt file is then created in that directory (instead of the root directory), and it contains only the hierarchy of the current directory and any subdirectories.
This tip (10054) applies to Windows 7, 8, and 10.
Robocopy is a robust file copy utility built into Windows. If you have a lot of file management to do that can't easily ...Discover More
It's simple to use Robocopy when dealing with entire directories. Dealing with directories is what it does best! This top ...Discover More
Downloading files from the Web is a pretty common occurrence. Keeping track of your downloads used to be a bit of a ...Discover More