Save Folder Contents List into a Text File
Easiest way to Create a List of Files & Folder Contents Into a Text File on a Mac is by first opening the folder in Terminal. Assuming you’ve setup this service it’s a lot easier than opening Terminal and then navigating to it.
Once that is done simply type the following into Terminal:
ls > somenameyoumakeup.txt
And of course hit Enter.
Boom! A text file in your folder on a Mac with a simple list of the folder’s contents.
Source: Save a List of Files & Folder Contents Into a Text File