Help to create txt file of tons of images in a folder

Discussion in 'Mac Apps and Mac App Store' started by zenmster, Jun 26, 2012.

  1. zenmster macrumors newbie

    Joined:
    Jun 26, 2012
    #1
    I need to create a text file of all these photos in a folder but I cannot find out how. I am using Mac OS 10.7 and I am not a programmer.

    Someone told me/emailed that I could do something like open the folder I want to create a txt file from and type in the Terminal box

    ls > whatever.txt


    I try that and all I get is NOTHING. Then I was told I could just pull the folder in to firefox which I tried. I get a list of files but multiple columns an d when I try to copy it to a word document all I get is a bunch of gibberish.

    There has to be an easier way...anyone? thx in advance.
     
  2. chrysrobyn macrumors member

    Joined:
    May 9, 2003
    Location:
    Austin, TX
    #2
    The Terminal command "ls" is what you want. There's not really a simpler way.

    Use the "cd" command to go to the directory you're interested in. Execute "ls" and verify that it lists the file names you want. If not, re-try changing directories.

    Once your "ls" is looking like what you want, you could always select it with your mouse and paste it wherever you want. If you want a file, you have to redirect the output. "ls > asdf.txt" works well. If you want it in your home directory, "ls > ~/asdf.txt", and if you want it on your desktop, "ls > ~/Desktop/asdf.txt". If you need to add a second directory, >> will concatenate instead of start a new file. If you need file modification times, "ls -l" will get you that. If you want those times and sort it by date, "ls -trl" gets a lot of use.
     
  3. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #3
    In Terminal, type "ls " (no quotes, but note the space after ls), then drag the folder into the window so it fills in the path. Then, select and copy/paste the output into a blank text document.

    If you want more detail, use "ls -al".

    jW
     
  4. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #4
    If I understand your question, you want to print a list of the filenames in a folder. To do that:
    1. Open the folder in Finder
    2. Command-A to select all
    3. Command-C to copy
    4. Open TextEdit
    5. Command-Shift-T to change format to plain text
    6. Command-V to paste
     

Share This Page