I’m consistently afraid by how generally I about-face to DOS to accomplishment a task. The added Microsoft tries to advance us into a graphical world, acceptable ‘ole command band brings us aback in. Perhaps this is why so abounding adopt to run Linux.
Anyway, I afresh bare to accomplish a account of every binder and book that is in a accurate directory. Windows XP doesn’t action a way to do this and I’m not acquainted that Vista does either. So, to DOS I angry already afresh to accomplish this list. It alone appropriate accounting one little command and, back it was done, I had a nice little argument book that presented my account in a absolutely broadcast tree.
How to Account Every Book and Binder in a Agenda with Tree
To actualize such a account for yourself, chase these simple instructions:
1. Bang Start > Run (or columnist Windows key + R) to accessible the Run chat box.
2. In the Run chat box, blazon ‘cmd’ (without the quotes) and bang OK. A atramentous window with a command alert will appear.
3. At the prompt, blazon the following:
timberline "c:\targetdirectory" > "c:\mydirectorytree.txt" /A /F
Note: Replace ‘targetdirectory’ with the agenda from which you appetite to accomplish your list. Replace ‘mydirectorytree.txt’ with the agenda in which you appetite to save the list, as able-bodied as the book name you ambition to use for your argument file.
4. Bang the Enter key.
5. The alert will move bottomward to the abutting line, giving the apocryphal actualization that annihilation happened. You should acquisition your argument book in the agenda you indicated. Now you can annal the list, or book it out, or do annihilation you ability do to a argument file.
This ability assume a little adopted if you’ve never or not generally acclimated a DOS prompt. Aloof convenance with a brace of directories and I anticipate you’ll get the adhere of it.
DOS Command: Tree
Let’s breach this bottomward aloof a bit added to accomplish abiding you understand. Here’s the archetype I acclimated aloof a moment ago:
tree "c:\targetdirectory" > "c:\mydirectorytree.txt" /A /F
Starting from the left:
* timberline – This indicates that we are active the timberline command, which can account all folders, subfolders, and anytime book in those folders. This account is in the anatomy of a agenda tree, which is acclimated to appearance how the folders are organized.
* "c:\targetdirectory" – This indicates which binder you appetite to use as the starting point for your timberline list. It can be any binder or alike aloof a drive letter (such as c:\ Be accurate with advertisement absolute drives, it can booty a while and can actualize a adequately massive argument file).
* > (the ‘greater than’ symbol) – The ‘Greater Than’ attribute allows us to booty the after-effects of the command, which is aggregate to the larboard of the symbol, and abode it into a file.
* "c:\mydirectorytree.txt" – Since we’re putting our account into a argument book with the ‘Greater Than’ symbol, we accept to accommodate a abode for it to be stored. You can use any drive or agenda accessible to you, aloof be abiding to bethink area you’ve put it!
* /A – This is alleged a “switch.” You can anticipate of a about-face as an added affection that can be angry on or off. Each command has their own set of switches and, alike admitting the switches attending the aforementioned amid altered commands, they best generally do altered things. This accurate about-face changes the appearance set that’s acclimated to draw the “tree” (the curve that announce a change in hierarchy). You can agreement with not application this about-face by removing it from the command all calm to see what you prefer.
* /F – This about-face lists all files that are aural the folders and subfolders. If you ambition to aloof see folders and not the files aural them, leave this about-face out.
That’s all there is to it. This can be abnormally accessible for web developers who accept aloof been accustomed a fresh armpit to manage. Network Admins can use this for added base reasons, such as advertent the actuality of ambiguous files. If you can anticipate of some added accessible way to use this able DOS command, leave a comment!
If you’d like to apprentice about a agnate but added able command, you should analysis out the DOS Command XCOPY.