how to make a printable "list" of a folders contents

Discussion in 'macOS' started by sonarghost, Jun 18, 2007.

  1. sonarghost macrumors regular

    Joined:
    Sep 6, 2006
    #1
    I am not sure if I am asking this question correctly so I'll give an example:

    I have approximately 20,000 sound samples in a folder that I would like to print a list of using text edit (or anything else you suggest). Do i HAVE to hand type each name to a list, or cut and paste each individual sample name or is there a command to "extract" the name of all of the contents?

    Thank you in advance to all of those that can help me!:)
     
  2. GimmeSlack12 macrumors 603

    GimmeSlack12

    Joined:
    Apr 29, 2005
    Location:
    San Francisco
    #2
    Try dragging all of the sound files into an open Text Edit window. Or select the files, hit copy, and paste into a text edit window. Good chance one of those will work.

    If those don't work I can drum up an Automator workflow for you.
     
  3. sonarghost thread starter macrumors regular

    Joined:
    Sep 6, 2006
    #3
    Thank you very much for the response!

    When i do copy the items and paste them to the text edit window the titles are in a random order.. I don't know why. The folder contents are alphabetized I have no idea how to get the same alphabetized result with the copy and paste.. Any Ideas?
     
  4. GimmeSlack12 macrumors 603

    GimmeSlack12

    Joined:
    Apr 29, 2005
    Location:
    San Francisco
    #4
    Sure. Do you have Excel? You could paste the file names into Excel and then use the AutoFilter to alphabetize the files. Otherwise I can figure this out with Automator but I'm not at my Mac right now (on my Vista PC at work :()and can't do it this moment. The Excel thing would work like a charm though.

    EDIT: BBEdit would sort them for you too if you have that (its a free download).
     
  5. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #5
    There is an AppleScript included with your Mac that can do this.
    It's in "Library>Scripts>Printing Scripts" It's called "Print Window Script".
     
  6. Lixivial macrumors 6502a

    Lixivial

    Joined:
    Jan 13, 2005
    Location:
    Between cats, dogs and wanderlust.
    #6
    And yet another solution: If you want some fun with Terminal, it's a simple matter of doing this:

    1. Open Terminal

    2. Type cd with a space after it and drag the folder that has the files into Terminal and press enter

    3. Type: ls -1 > my_directory_listing.txt

    4. Close Terminal, and in the folder with the 20,000 samples, it should have created a my_directory_listing.txt -- open this with TextEdit.

    By default this will sort them by name alphabetically.
     
  7. sonarghost thread starter macrumors regular

    Joined:
    Sep 6, 2006
    #7
    First of all..GimmeSlack, Lixivial, and lancestraz Thank you for your time in helping me find the answer! I downloaded bbedit as recommended and plan on trying that out. I actually just finished using the apple script and it worked like a charm!:D

    Once again, THANK YOU ALL!:)
     
  8. theBB macrumors 68020

    theBB

    Joined:
    Jan 3, 2006
    #8
    Wouldn't it be easier to just type:

    ls > my_directory_listing.txt

    in your step 3.
     
  9. Lixivial macrumors 6502a

    Lixivial

    Joined:
    Jan 13, 2005
    Location:
    Between cats, dogs and wanderlust.
    #9
    EDIT: Oh, yes it would be easier. :)

    Thanks for the heads up on that.
     
  10. ozbADmaN macrumors newbie

    ozbADmaN

    Joined:
    Aug 9, 2006
    Location:
    australia
    #10

    Thanks Lixivial for pointing out this script, but can you get the same script to print to PDF or Excel, reason is I have many folders that I need the information from and I would prefer to get them all in one place then edit them then print.


    Any suggestions.
     
  11. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #11
    Code:
    ls -R <path_to_folder> > ~/Desktop/list.txt
    Just open up the file list.txt that will appear on your Desktop in your text editor and you can do PDF or whatever your heart pleases. The -R flag is important if you have subdirectories, which I imagine for that many sound samples you will.
     
  12. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #12
    No it isn't.
     

Share This Page