1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: How to convert folder, subfolder and file names into text.

Discussion in 'All Other Software' started by Ripperdan, Nov 11, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. Ripperdan

    Ripperdan Thread Starter

    Joined:
    Oct 28, 2009
    Messages:
    57
    I have a CD with a bunch of folders with a bunch of files and subfolders with a bunch of files on it.

    Does anyone know of a free utility to capture those folder and file names into something that I can manipulate (Text, Excel, Word, etc.)? I have found a couple but the ones I found only do 1 layer at a time. I would like to get all the information in a tree structure format.
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,731
    Have you tried Karen's directory printer?
    http://www.karenware.com/powertools/ptdirprn.asp

    What do you mean by Tree Structure format?

    You can in theory get a directory listing from a cmd prompt as well and redirect the output to a text file.

    dir E: /s >filelist.txt
     
  3. Ripperdan

    Ripperdan Thread Starter

    Joined:
    Oct 28, 2009
    Messages:
    57
    Tree Structure.jpg The attached JPG file shows what I mean about tree structure. Something like what you see if you go to "My Documents" and have the "Folders" button on and then click on the + sign so the sub-folders open up.
     
  4. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    Open Command Prompt
    type Tree E: (or what ever the correct drive letter\path is)
    Right click the Title bar, point to Edit, Click Select All
    Press Enter
    open Notepad
    Press CTRL+V
     
  5. stantley

    stantley

    Joined:
    May 22, 2005
    Messages:
    7,063
    I never saw that before, that's pretty cool. (y)

    But it looks like you have to use WordPad, the tree stucture shows up as a bunch of boxes in Notepad.

    It also looks like there's a limit on the number of characters that show up. Is there anyway around that?


    Edit: I got it to work in Notepad, I was using Tahoma, it works OK with Arial.
     
  6. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,731
    I totally forgot about the Tree cmd. I guess only the old timers remember that stuff. :)
     
  7. throoper

    throoper Trusted Advisor

    Joined:
    Jan 20, 2007
    Messages:
    5,152
    You'll need the /F switch to also list the files in each subfolder.
    Tree Drive: Path /F
     
  8. Ripperdan

    Ripperdan Thread Starter

    Joined:
    Oct 28, 2009
    Messages:
    57
    Thank You, Thank You, Thank You. That is exactly what I wanted.

    It aslo can be pasted directly into Word and Excel.
     
  9. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    Seems this "old timer" forgot the /F switch, thanks throoper(y)

    There is also a /A switch that uses ASCII instead of extended characters. This let's you redirect output directly to a text file. Not quite as nice looking, but easy to automate.

    Tree E:\ /A /F >"%Userprofile%\Desktop\Tree.txt"
     
  10. stantley

    stantley

    Joined:
    May 22, 2005
    Messages:
    7,063
    Thanks, doing it that way you can get all the files on a drive in one text file.
     
  11. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    Missed this in my first reading.

    The default for the Command Prompt screen buffer is 300 lines. You can increase that to 9999 lines. Which still might not be enough, so redirection is the way to go to be sure you capture all of it.

    To change the Screen Buffer size, right click the Title bar of the Command Prompt, click Properties.*
    Click the Layout tab
    Enter the desired buffer size in the Height: box under Screen Buffer Size.
    You can make the windows wider here as well, handy with a wide screen display. I have mine at 150.

    *If you click on Default instead of Properties, the settings will apply to all Command Prompt windows you open, unless you've created settings for a particular Command Prompt, either associated with it's name, or the shortcut used to open it.
     
  12. stantley

    stantley

    Joined:
    May 22, 2005
    Messages:
    7,063
    Thanks TheOutcaste, that will indeed come in handy. :)
     
  13. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    Just a note, the Tree command doesn't list hidden or system files.
     
  14. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/876304