Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Simple - getting a dir listing

  • 21-12-2004 12:09AM
    #1
    Closed Accounts Posts: 2,035 ✭✭✭


    This is probably easy but I simply don't know how to do this:

    I have a folder with a lot of sub folders - it's a filing system. I want to show someone the entire contents of all directories - including the files. How? Do I have to use DOS or could I get an explorer style view?

    I'm not a fan of screen printing the folders in list view 'cos it still won't show the contents of each folder (in terms of sheer volume or detailed file names - doesn't matter).

    Thanks in advance.


Comments

  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    open command prompt and type in:
    dir /s "DIRECTORY PATH" > c:\output.txt
    

    e.g. dir /s "c:\my music\" > c:\output.txt

    The quotation marks are important, don't leave em out! The output will look as follows: At the top will be a list of every folder (And subfolder) and beneath that list, all the files for each subfolder will be listed underneath the name of the folder they're in. You'll see what i mean :p


  • Closed Accounts Posts: 2,035 ✭✭✭Bri


    Excellent thanks a million. Knew there must be some way. It's not exactly pretty but it gets the job done.

    Thanks again.


  • Closed Accounts Posts: 19,080 ✭✭✭✭Random


    open a command window and goto the folder you want.

    They type "tree" (without the quotes).

    That will work also :)


  • Closed Accounts Posts: 2,035 ✭✭✭Bri


    Right so thanks!


  • Registered Users, Registered Users 2 Posts: 7,290 ✭✭✭kenmc


    ciaranfo wrote:
    open a command window and goto the folder you want.

    They type "tree" (without the quotes).

    That will work also :)
    needs to be "tree /f" to get the files in the folders. you can pipe this to a file also, but you'll need to edit the special chars to be stuff like |, - and + instead of À, and other funnies...


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 20,859 ✭✭✭✭cormie


    Hey,
    This MAY help. It lists folders and each subfolder VERY nicely. Read through the whole thread for instructions, can be quite complicated. Unfortunately the result will NOT show the actual files, I didn't want it to. I'm sure Khannie could sort that out pretty easily however:)


Advertisement