How to create a list of all the files inside a macOS directory in seconds with TextEdit
On the rare occasion a list of all of the files within a folder are required, there is a simpler way than manually typing it out or creating a collage of Finder screenshots. AppleInsider reveals how to compile the list using TextEdit.

There aren't many reasons why one would want to create a list of file names, but sometimes it can be quite a useful thing to produce. For example, a developer may want to keep a record of files and folders within a directory when they are producing an app, while those with extensive media collections could require a list based on their archives.
First, open up the folder you want to create the list from, and select all of the files and folders you want to include. Once all of the relevant files and folders are selected, copy the list by either selecting Edit then Copy Items in the menu or the Command-C keyboard shortcut.

Open up TextEdit, Apple's included text editor, and create a New Document. Once it is open, go to Format in the Menu and select Make Plain Text.
Finally, paste the files into the text document by selecting Edit then Paste, right clicking the document and selecting Paste, or by using the Command-V keyboard shortcut. This will paste the entire list of file and folder names into TextEdit.
There is also the option to create the same list that includes the folder path for each item, instead of just the file names. This can be created by dragging the selected files and folders into the TextEdit document, again set to Plain Text, instead of pasting.

If the TextEdit document is kept as Rich Text, the Mac will instead attempt to insert a copy of the documents and folder into the document. By keeping it as Plain Text, only the file and folder names will be pasted.
If you want to use this list elsewhere, be sure to select the pasted text and copy it before pasting in the app you want to use, otherwise you could end up pasting a copy of the folders and files themselves.

There aren't many reasons why one would want to create a list of file names, but sometimes it can be quite a useful thing to produce. For example, a developer may want to keep a record of files and folders within a directory when they are producing an app, while those with extensive media collections could require a list based on their archives.
First, open up the folder you want to create the list from, and select all of the files and folders you want to include. Once all of the relevant files and folders are selected, copy the list by either selecting Edit then Copy Items in the menu or the Command-C keyboard shortcut.

Open up TextEdit, Apple's included text editor, and create a New Document. Once it is open, go to Format in the Menu and select Make Plain Text.
Finally, paste the files into the text document by selecting Edit then Paste, right clicking the document and selecting Paste, or by using the Command-V keyboard shortcut. This will paste the entire list of file and folder names into TextEdit.
There is also the option to create the same list that includes the folder path for each item, instead of just the file names. This can be created by dragging the selected files and folders into the TextEdit document, again set to Plain Text, instead of pasting.

If the TextEdit document is kept as Rich Text, the Mac will instead attempt to insert a copy of the documents and folder into the document. By keeping it as Plain Text, only the file and folder names will be pasted.
If you want to use this list elsewhere, be sure to select the pasted text and copy it before pasting in the app you want to use, otherwise you could end up pasting a copy of the folders and files themselves.
Comments
A really cool trick related to the above: hold the command key as you drag a folder or file to a Terminal window. This changes the shell's current directory to that folder or the folder containing the file.
Many document based applications show a proxy icon found next to the document name in the title bar. Drag this to TextEdit (or a plain text editor like BBEdit) to get the file path. Command-drag it to Terminal to go to the document's parent folder.
2) I think it's easier to simply paste by Command-Option-Shift-v instead.
no wonder people enjoyed beating us up in high school.
I've got TextEdit set to open new files as plain text, so command-V works perfectly.
This is also my preferred method of stripping formatting from text copied from the web, Word, etc (specifically copying citations from Pubmed, etc)
Yeah, not everyone is a Mac Genius nor Mac Geek nor Mac Nerd (nothing bad of any of these, though...), even if using Mac since the first PowerMac like me.
(I doubt there's a Mac power-user that knows EVERYTHING Mac...)
"All Inclusive" and "Universal Access", the way to go!
Knowing that you do not know everything is the start of getting smarter.
No question is a dumb question. (unless asked repeatedly...)
Thanks!
cd the/directory
ls -1
(that's a "dash" and then a "one" after ls)
This helped me great deal.
Appreciate it.
Cmd-C, then Cmd-V, done. I've done as shown in the article for years. The seconds saved by using other methods would probably save at least 5min a year. I'm good, thanks.
Also related to this tip: when in a file open/save dialog, you can drag & drop a folder or file from Finder to the dialog window/sheet to target exactly where you want to be instead of navigating to there inside the dialog, when you already have the appropriate location open in a Finder window.