Creating a List of Files from Folders on Mac

I want to create lists of files from folders but can’t work out how to do it. On Windows, I can open the Command Prompt and list all the files, such as dir /b > filelist.txt. (This command creates a list of all .txt files.) But I can’t find a similar one on Mac Terminal to replace it.

I know how to create files on Mac but the summary of the list of all the files, um…How about copying one by one in your Word/notes?

Hello, there are some commands like the one you said in Mac Terminal, just have a try:

  1. ls -1 /path/to/your/folder > filelist.txt.
    (This will list all the files in the specific folder and save them to filelist.txt. The -1 flag ensures that each file is listed on a new line.)
  2. ls -1 /path/to/your/folder/.txt > filelist.txt*
    (This only lists the specific file types, like .txt files.)

It’s a simple but powerful way to generate file lists. Give it a try!

Hi, Sherry,
Maybe you can use this:
Use Command + A to select all the files, then use Command + C. Open a text-only app such as TextEdit and use Command + V to paste the file names.
Let me know if you need more help~

Maybe you can copy the files to an Excel, it really works.

Yeah, I got it~ And the Excel also can do this.