How can I create a text file of all the files in a folder on Mac?

Is there a straightforward way to create a text file of all the file in the current folder in Finder? I have a MaBook Pro.

Yes and I know a simple way to achieve what you want.

In Finder, select the files you want to list in the text file, press Command-C or right-click and choose Copy, then open TextEdit, switch it to plain text mode and paste the files.

You can also create a list of files contained in a folder on Mac using Terminal.

  1. Open Terminal.
  2. Run the command below to get a list of all the files inside the folder, including the hidden files.
ls -a > listing.tx
  1. Then execute another command to get the listing.
ls -al > listing.txt

If you don’t need hidden files on the list, use the following two commands instead.

ls
ls -l