How can I print the list of files that appear in a Finder folder

I have in a folder some hundreds of files (say they are invoices) and I want to print the list of the files in that folder to check them say against a set of physical documents and I want to have a printout of the listing of the files that are listed in a specific folder.


Anyone could help ?


Many thanks

MacBook Pro 13″, macOS 12.7

Posted on Jun 3, 2024 4:15 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 3, 2024 10:52 AM

Launch Terminal.app


Enter the change default command cd, and follow it with a space

cd 


Drag the folder you want to list from Finder to the command line. It’ll look something like the following, with the example ~/Documents shown:

cd ~/Documents


Now press return.


Enter the following directory listing (ls) command (that’s a numeric 1 and not a lowercase L there), with the output written to MyListing.txt (don’t include any spaces in the filename you use) in your home (~) directory:

ls -1 >~/MyListing.txt


Press return.


You can now view your listing by looking in (or by printing) MyListing.txt.

Similar questions

6 replies
Question marked as Top-ranking reply

Jun 3, 2024 10:52 AM in response to jean-francois168

Launch Terminal.app


Enter the change default command cd, and follow it with a space

cd 


Drag the folder you want to list from Finder to the command line. It’ll look something like the following, with the example ~/Documents shown:

cd ~/Documents


Now press return.


Enter the following directory listing (ls) command (that’s a numeric 1 and not a lowercase L there), with the output written to MyListing.txt (don’t include any spaces in the filename you use) in your home (~) directory:

ls -1 >~/MyListing.txt


Press return.


You can now view your listing by looking in (or by printing) MyListing.txt.

Jun 3, 2024 9:54 AM in response to jean-francois168

If you have the free BBEdit, you can just drag and drop that Finder folder on it and it will generate a hierarchy of the folders/filenames in that parent folder. Then press ⌘P to print that display. Although BBEdit is a paid application, after the free trial, it becomes a free, but reduced-feature product that is still quite capable.


Tested: BBEdit 15.1 on macOS Sonoma 14.5

Jun 4, 2024 6:29 AM in response to jean-francois168

<< it actually copies the files content ... >>


The system clipboard may contain as many as 20 different formats of the copied information at the same time. When you choose Paste, the most appropriate format is chosen to Paste the data. If you leave the document in its default form before you Paste, iIt pastes MUCH more than just filenames. However, if all that other stuff is not appropriate for the destination, only the filenames are pasted.


NB >> choose 'Make Plain Text' off the Format menu, BEFORE you Paste


then ONLY the filenames will be Pasted.

Jun 3, 2024 9:35 AM in response to jean-francois168

Open that finder window in List View, and click column heading {by name, by date} to sort in the order you want to use.

select all.

copy

open TextEdit

choose NEW

NB >> choose 'Make Plain Text' off the Format menu

Paste -- this should past the list of Names (only), in the same order they appeared in your finder window.


you can print that document as is, or select all and choose enlarge [command+] to get larger text. You can add blank Ines as you wish.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I print the list of files that appear in a Finder folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.