How to print a list of files in a folder

Discussion in 'Mac Basics and Help' started by rodeman, Oct 21, 2008.

  1. rodeman macrumors newbie

    Mar 1, 2008
    I've got a folder full of files. I'd like to be able to print the folder view so I have a printout of all the files in that folder. Is it possible to do something like this?

    I know I can take screen shots and then print the image. But I'm looking more for a straight printout of the file names.

  2. Latro macrumors member

    Mar 23, 2008
    rodeman - You can print a list of files in your folder by navigating to it through terminal.

    Open Terminal, navigate to the folder your files are in and then use the following command: ls -l

    After your files are listed, select them with your mouse and then on the Menu Bar click Shell and Print Selection.

    To see what the print output will look like, preview the print or print to PDF.

    Let me know if you have additional questions.
  3. rodeman thread starter macrumors newbie

    Mar 1, 2008

    Thanks for the reply. I'm a pretty novice MAC user. Been on PCs all my life and just started with a MAC about 8 months ago. I've never used the terminal before and I don't know how to navigate to that folder. Can you give me some guidance there too.

  4. MarkMS macrumors 6502a

    Aug 30, 2006
    I think you can drag and drop the folder in question into Terminal.

    (I.E., Let's say you want the list of files in the Documents folder.)

    In terminal, type in ls -l, drag the (Documents) folder and press enter. It will look like this:

    ls -l /Users/YourName/Documents

    Update: In case you want to learn more about this command, check this site out.
  5. Latro macrumors member

    Mar 23, 2008
    MarkMS is correct in that you can drag the folder you want to list from Finder into Terminal.

    If you want to do it by command line prompts:

    ls - lists current directory and folders
    cd <nameOfFolder> - moves you to the folder you just called
    cd .. - moves you up a folder

    So if I open Terminal and I'm looking at my home directory but I want to move to my Desktop I'd enter: cd Desktop

    to move back to my home directory I'd enter: cd ..
  6. agerbek macrumors newbie

    Aug 20, 2009
  7. Olivier L. macrumors member

    Feb 26, 2009
    alternative using Automator

    As an alternative to the solution described above, I would propose using Automator, especially if this is a task you will want to repeat regularly on various folders.

    With automator, you can easily build a little "program" to make that...

    Here is how to do it:
    1. Start automator
    2. Select FINDER in the left "Library" column
    3. Drag and drop from the right "action" column the following actions:
    - Ask for finder items (make sure you select the type "Folders" in the options)
    - Get folder contents
    - Print finder items or maybe better New text file

    If you use it often on various folders, you can make it an app. and put in your Dock.

    Good luck!
  8. bibliophile1974 macrumors newbie

    Dec 22, 2008
    One really simple way to do this is the following:

    1) Open TextEdit (or, I assume, any text application).

    2) Navigate to the folder in question with your Finder.

    3) Select a file within said folder and press command A to select all.

    4) Press command C to copy.

    5) Return to TextEdit and hold down command, option, and shift, and then hit V to paste and match style.

    Voilà. There's your list.
  9. ethana macrumors 6502a

    Jul 17, 2008
    Seattle, WA
    What if I wanted to delimit each file with a *

    For example, 1.jpg*2.jpg*3.jpg
  10. ethana macrumors 6502a

    Jul 17, 2008
    Seattle, WA
    Nevermind... I found out how. Just replace the invisible newline character with *.
  11. ieevans macrumors newbie

    May 12, 2004
    Plano, TX
    UNIX lineprinter printing.

    Easiest way from the console is navigate to the directory where the files are and pipe `ls` with whatever options you want to `lp`,, it took a little while on my new HP printer. Not sure why but I've never used it on OS X, only Solaris and other UNIX systems but it works.

    ls -l | lp

    That's it, it will print the same output as `ls -l` or whatever options you use. No copy or paste or opening of other apps, no print status thou. You'd have to use `lpq` to look at what is in queue to print. I doubt you'll use it enough to care too much about antique UNIX command line printing :D Anyway there are lots of books on UNIX and Mac OS and free stuff online as well.

    I personally like `ls -lrt`. That will show you the long listing sorted by modified time in reverse order, so newest last.
  12. MrCheeto macrumors 68030


    Nov 2, 2008
    Use that magnifying glass at the top left of your screen, called the Spotlight. It's super powerful, and if you've had trouble using Vista or 7's rip off of this feature, just know that this version, as with most Apple versions, actually works and works well. You can search for files, folders, applications, pictures, and even search for words that may be IN a document or PDF. I navigate most of my files directly from here.
  13. sh0vel macrumors member


    Feb 28, 2010
  14. salles macrumors newbie

    Sep 28, 2010
    Excellent simple way to Print Files

    Tks a lot bibliophile1974 - A maneira mais simples de imprimir nomes de arquivos no finder no OSX

  15. MyMaria macrumors newbie


    Mar 22, 2009
    OMG! Thank you so much! You saved me a lot of time there! :D
  16. LikuidMetal macrumors regular


    Feb 25, 2010
    Irving Texas

    Damn this was the best way of getting the list going. Great info thanks.
  17. AllenKenya macrumors newbie

    Jan 17, 2010
    How to print a list of files in a folder

    While copying and pasting works, if you want a formatted listing (i.e., each sub-folder and contents indented), this is better and at least as easy:

    1. Open a new window in TextWrangler -- other text editors might work but TextEdit did not as it only copied the folder's path. TextWrangler is the freeware version of BBEdit and is available for downloading here: <>
    2. Navigate to the folder you want in the Finder.
    3. Drag that folder to the TextWrangler window.
    4. You'll have a formatted listing of all the contents of that folder, including all sub-folders and their contents.
  18. CYnthiaBlue44 macrumors newbie


    Dec 17, 2010
    How to print a list of files in a folder

    This worked for me thank you!
  19. MDJCM macrumors regular


    Sep 12, 2009
    UK, South
    Excellent, thanks!
  20. bibliophile1974 macrumors newbie

    Dec 22, 2008

    I'm glad you guys are finding the tip useful. Thanks for saying thanks!
  21. orbdrums macrumors member

    Dec 13, 2008
    Thanks but that only gives me a filename list but no stats that go along with the files (size, date). My objective is a list of filenames, sizes, and dates created which I get when I drag the folder name to my printer icon and save as a .pdf.
  22. blow45 macrumors 68000

    Jan 18, 2011
  23. profinite macrumors member

    May 1, 2009
    bibliophile1974 - You are a genius. What a simple way to accomplish what I have always wanted to do!! :)
  24. CYnthiaBlue44 macrumors newbie


    Dec 17, 2010
    PrintWindow worked

    Thanks for the advice. I downloaded PrintWindow and after reading the "help" instructions was able to generate an excel file. Many thanks for the assistance.
  25. blow45 macrumors 68000

    Jan 18, 2011
    de nada, glad i could help.

Share This Page