Copy contents of a Finder file as text
is there a way to copy the contents of a Finder file as text
iMac 27″ 5K, macOS 13.7
is there a way to copy the contents of a Finder file as text
iMac 27″ 5K, macOS 13.7
JeffSC47 wrote:
is there a way to copy the contents of a Finder file as text
Since "a Finder file" is ambiguous to me, I may or may not understand what you would like to do. However, I determined two separate behaviors result from opening a Finder window > "select all" > copy followed by pasting into a text editor results in different actions depending on the particular text editing software.
It would help if you were to describe which of those actions you seek, or if you need something else.
If you mean you want to have a text listing of the items within a specific folder, then there is no simple method. AFAIK, you will need to resort to an AppleScript or command line utilities to gather the information & send it to a text file. You would need to be more specific on your intent & goals here including whether this is a one off need or something you need for other folders as well and the specific information you need in that text file.
JeffSC47 wrote:
is there a way to copy the contents of a Finder file as text
Exactly what "Finder file" do you wish to copy to text?
There is no one specific type of file that the Finder app creates, per se.
Finder is the file manager for macOS. As such, it has access to and can manipulate the location, duplication, deletion and other functions required to manage all of the files on your computer. That includes the files created by all manner of applications including music, text, video, utility, browser, graphic and others.
Use the Finder on Mac - Apple Support
If you share with us exactly what you are trying to accomplish, then we can provide focused guidance.
Copy everything, open TextEdit, choose Make Plain Text from the Format menu if needed, and paste it in.
(264605)
JeffSC47 wrote:
A list of the file names within the folder.
So do as Niel suggested in TextEdit. Or paste to BBEdit. Or BBEdit > Edit > Insert > Folder Listing.
Or paste as text to LibreOffice Writer document if you don't want to paste the possible file contents as you seem to want to do.
JeffSC47 wrote:
I am operating OS Tahoe 26.5.1. Selecting the Folder and Quick Actions > only “Customize …” is displayed - no “Folder files to text” offered.
You have to download & install the Quick Action from the link @VikingOSX provided. It's not something "built in" to macOS.
FWIW, I far prefer an app like Print Window 5 or Nifty File Lists for this purpose. They provide a lot of flexibility for printing folder/file lists including recursion into nested folders. I use them all the time. Cost $19-20, well worth the price.
EDIT: Interesting to find that you cannot embed a straight "http://" address here, only "https://". The address for Print Window is searchwaresolutions <dot> com.
John Galt wrote:
JeffSC47 wrote:
is there a way to copy the contents of a Finder file as text
Since "a Finder file" is ambiguous to me, I may or may not understand what you would like to do. However, I determined two separate behaviors result from opening a Finder window > "select all" > copy followed by pasting into a text editor results in different actions depending on the particular text editing software.
In BBEdit (for example) that action results in the folder's file names• being pasted
In TextEdit (for example) that action results in the contents of those files• being pasted
FYI, if you create a new TextEdit document and convert it to Plain Text before pasting from the Finder, then it will result in only the names of the items from the Finder.
Works for me. In TexEdit you might have to choose Make Plain Text (as Niel suggested). Or Option-Copy Finder items as Pathnames.
You did understand my attempt at describing what I want to do. As I said, this used to be a very simple thing to do > select the listing displayed in the folder displayed by using the cursor, copy, then paste the copied selection into .doc or email page. That very helpful and simple procedure has apparently gone bye-bye.
Here is a Finder Quick Action that allows you to right-click on the target folder, select Quick Actions > Folder Files to Text File, and write a list of that folder's files in sorted order to a text file on the Desktop. This is not a recursive solution. That text file will bear the naming convention <foldername>.txt (without the arrow brackets).
Tested: macOS Tahoe 26.6.1
EDIT: Interesting to find that you cannot embed a straight "http://" address here, only "https://".
It's a recent change. http:// links no longer render as clickable URLs.
The site you referenced implements SSL only on its payment pages. That's ok as far as I'm concerned.
When you click that "Finder Quick Action" link in my previous post, that will let the Shortcuts application install that Quick Action so you can reference it from the secondary Finder menu as I mentioned. If the Shortcut "Folder Files to Text File" does not appear on the Quick Actions menu, then you will need to enable it:
System Settings > General > Login Items & Extensions > Extensions (By Category) > Finder i⃝ panel
Now, locate "Folder Files to Text File" in the list of actions and enable it.
Once that is done (if needed), you can then right-click on a Finder folder and use the Quick Action.
Exactly > the list of files displayed in a Finder folder.
In a given folder, do you want a list of just the filenames within it, or their full paths to that folder written to a text file? Sorted?
A list of the file names within the folder.
Copy contents of a Finder file as text