Export file names to text?

Discussion in 'Mac Basics and Help' started by Enseep, Mar 12, 2008.

  1. Enseep macrumors newbie

    Joined:
    Jul 9, 2006
    #1
    Hi all, I was wondering if anyone could point me in the direction of an app (or an option I'm missing in finder) that might be able to export the names of files in a certain folder (and subfolders, if possible) to a text file. I know how to print a list using applescript, but I'd like to be able to have the list in an editable text file. Thanks in advance!
     
  2. 4JNA macrumors 68000

    4JNA

    Joined:
    Feb 8, 2006
    Location:
    looking for trash files
    #2
    open up terminal (applications>utilities), cd to the folder, and then type;

    ls -R > contents.txt

    this would list all of the files in the current folder and subfolders, and then output the list to 'contents.txt' which will then be saved in the same folder. if you are interested in seeing the hidden files included in the list, the use 'ls -a -R' instead. best of luck.
     
  3. Kettle.Rider macrumors newbie

    Joined:
    May 13, 2009
    #3
    Another way, using TextWrangler

    I'm a big fan of TextWrangler, the free text editor from BareBones Software, maker of BBEdit. Here's a method that works well if you are squeamish about using the Terminal.

    Open a new document in TextWrangler. From the Edit menu, choose Insert / Folder Listing...

    Then navigate to the folder from which you want all the file and folder names and choose it. (It will examine all subfolders as well.) Viola! It even correctly tabs in the various subfolders and file names.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "Do it the easy way, that's hard enough."
    R.I. Keedy, 1924-2005
     
  4. genu1ne macrumors newbie

    Joined:
    Feb 10, 2007
    #4
    Great tip, thanks, just googled for that function :)
     
  5. BollywooD macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #5
    thanks for that, I was messing around in automator, trying to figure out how to do exactly that.

    UNIX is awesome.
     

Share This Page