Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Enseep

macrumors newbie
Original poster
Jul 9, 2006
6
0
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!
 
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.
 
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
 
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.

thanks for that, I was messing around in automator, trying to figure out how to do exactly that.

UNIX is awesome.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.