Jump to content

TREE cmd.exe command


Recommended Posts

Ok, I checked google for this and didn't find what I was looking for. Lots of info on TREE command and what it does, but I want to output it to a text file. The problem is it leaves the ascii text in the text file, but what I wanted to know is there a way to convert it to lines, or underscores to be viweable in something like a plain text editor.

Here is what I am doing from a command prompt:

TREE c: > DriveTree.txt

It creates the text file ok, but its garbled data and makes it hard to read. The reason I am doing this is I want a quick way to copy a drives structure to things like a usb key, etc. but I would probably end up just using the DIR command to list the directories instead since this is almost unreadable in plain text.

I just like the tree layout and how it looked though. Would make a nice image file to print out as well. Here is what it looks like in a command window.


Anyone have any idea how to write it out so it would look the same in a text file or some other document format?

Link to comment
Share on other sites

Nevermind. Just figured it out. You use /A to remove the ascii text when switching (>) output to a text file. EX:

TREE C: /A > Tree.txt

Sorry. I looked all over and then I remember the old /? to get the help file from dos commands. Should have checked there first, but didn't think of it at the time.

Link to comment
Share on other sites

Very cool I'll have to use this...


lists the help file. Pretty dumb I didn't think of it until after I checked google...

Link to comment
Share on other sites

  • 1 month later...

i just tried, this is pretty neat, i woulda never thoughta saving the tree command's results.

then again, i thought i would never see a dos-like prompt ever since i sold all my dos games....

and the fact that it is oddly satisfying....

anyways... this'll be great to convince my programming teacher, who despite his title, knows very little about computers and manipulating them, that im doing work, so he wont assign me new projects cuz i just finished the last one in record time.

i'm VERY good at programming class.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...