Export file names to text

Terminal file listWe have had the need to export the names of files in certain folders for clients or our records. We have two methods to do this:

1. Use the Mac Terminal

2. Use TextWrangler, a free program

Terminal

To use the terminal, open Terminal (applications>utilities) on your Mac, navigate to the folder you want to make a text file out of the file names in the folder, then type:

ls -R > contents.txt

This command lists all files in the current folder and its subfolders. That file is then placed in the current folder. Hidden files can also be added to the listing with:

ls -a -R > contents.txt

TextWrangler

Open TextWrangler. Create a new blank file. In the Edit menu, select Insert / Folder Listing…

Navigate to the folder you want the file name listing from, then select it. All subfolders will be added, too.