Print a list of the whole file directory

Discussion in 'Mac Basics and Help' started by Judo, Sep 6, 2006.

  1. macrumors regular

    Mar 6, 2002
    New Zealand
    I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX.
    It would be good to be able to omit some folders from this list as well.

    I've had a look around but have not been able to find anything to help me.
    Any ideas anyone?
  2. macrumors 6502a


    Aug 6, 2006
    I'm no UNIX expert, but I'm fairly certain you can do this easily via the terminal. Study up on some terminal commands.

    And just out of curiosity: why, if you don't mind me asking? A list of every file would be HUGE.
  3. macrumors 68030


    Apr 17, 2004
    A Stoned Throw From Ground Zero
    When you click on your HD icon from your desktop, depending on how you
    have your view preferences set, you'll either see folders or a list or column view

    Click the middle VIEW button and you'll get a list of all your main folders and sub folders.

    Is this what you were trying to print to pdf?

    Please be careful and don't just go moving files around if you don't know where they belong.
  4. 7on
    macrumors 601


    Nov 9, 2003
    Dress Rosa
    OS9 had this... I don't believe it made its way to OSX yet.
  5. thread starter macrumors regular

    Mar 6, 2002
    New Zealand

    Yeah, I thought there might be a unix command for this, I'll have to look it up, unless there are any experts out there who can help me out.

    A client is asking for this. She has asked for a list of all files on her computer. And I'm not exactly sure why she wants it, but she's the one paying.
  6. thread starter macrumors regular

    Mar 6, 2002
    New Zealand

    Not quite what I want, I need a list of all of the files on her computer. I'm a Apple techie, so I know what not to move, and I should probably know how to do this but I dont. :(

    Thanks for the help so far guys, you're awesome. :hugsmilie:
  7. Administrator/Editor


    Staff Member

    Jan 20, 2005
    She does realize that this list could easily be 50,000+ files long, right?
  8. macrumors P6


    Jul 17, 2005
    5045 feet above sea level
    try typing

    ls /*

    I am not sure if this will get all of the folders within folders though just all of the directories and the files in the root directory

    anyone figure this out?

    to save it as a file just do this though

    ls /* > filename ~ the tilde is the directory you want to save the file in

    hope this helps somewhat or at least provides a starting point
  9. Administrator/Editor


    Staff Member

    Jan 20, 2005
    #9 we go. Download WhatSize. Let it scan the entire hard drive. Hit Command-3 to see everything in Table View. (BTW, my tiny 500 MHz iBook with 4 GB of stuff on has 85000 files and 20000 folders.) Click somewhere on the table to make sure it has focus, then print to PDF. I tried it with a small sample of files...about 25 of them (used the "files over 100 MB" filter to limit things)...and it seemed to work.

    I don't know how happy her computer will be about trying to produce a 2000+ page PDF though...
  10. macrumors regular


    Apr 19, 2004
    in the terminal type

    find /

    will list everything

    find / -type f

    will list just files. change f to a d to find just directories.

    find / -type f > allfiles.txt

    will save it in a text file called allfiles.txt

    man find

    will tell you more about the find command
  11. thread starter macrumors regular

    Mar 6, 2002
    New Zealand
    Woo, just tried this and it's up to 2100 pages. I don't think she could use that.
    I might have to find a way to exclude the system and library folders, and I think the terminal maybe the only way to do this.

    edit: just over 3600 pages
  12. thread starter macrumors regular

    Mar 6, 2002
    New Zealand
    Thanks Dukebound and Cyberbob. Looks like that's gonna work fine.

  13. macrumors newbie

    Feb 3, 2010
    There's no utility like the Windows OS's "Folder Printer" for the Mac?
  14. macrumors member


    Jan 8, 2002
    Zushi, Japan
    Not directly.. but you can use the UNIX commands or automator. The question here is why..? But each to their own..
  15. macrumors member


    Aug 1, 2010
    I'm not sure why one would want a list of ALL files, but I could see a list of all files in a particular directory, such as movies or something.
  16. macrumors newbie

    Sep 28, 2010
    Another way

    This is a bit of a basic approach but its easy and doesnt need terminal.

    What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.

    Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.

    In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.

    In Pages or Text edit, choose edit then "paste and match style"

    You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.

    Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
  17. macrumors 65816

    Jan 13, 2008
    Open Terminal, type the following:

    ls -R > everyfile.txt

    ....this will be long.
  18. oldguyfromnj, Jun 13, 2011
    Last edited: Jun 13, 2011

    macrumors newbie

    Jan 9, 2009
    OK, but this only copies the file NAMES, not Modification Date or size.
  19. macrumors newbie

    Sep 10, 2011
    Thankful for those who post solutions in MacRumors!

    3. Judo's issue(s) was resolved.
    2. toasted_ICT's solution worked well for what I was needing.
    1. Thanks to all of you who aim to help others on this forum!
  20. macrumors newbie

    Mar 20, 2013
    JUST what I was looking for! Many thanks.

  21. macrumors 603

    Feb 20, 2009
    "I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX."

    Are you really REALLY sure that you want to do this?

    Do you know how many files make up a typical installation of OS X?

    We're talking in the neighborhood of 200,000+. You may actually have more than that.

    Do you really want to create a pdf with a quarter of a million entries?

Share This Page