You can also watch this video at YouTube (but with ads).
How To Get File Listings As Text
Comments: 19 Responses to “How To Get File Listings As Text”
Leave a New Comment Related to "How To Get File Listings As Text"
(Your comment should relate directly to the topic of this post. Unrelated comments will simply be removed by moderators.)
Thanks bunches
Wahhhhh... where were you last week??? Do you know what I had to go thru to copy the files? I think I took a screenshot, opened it in Preview so it shows text, and copied the text. Luckily it was only ONE folder, but wow.. I didn't even know that was possible!! THANK YOU!
Your timing is amazing. I have been trying to do this for the past week. Ta Da and there you are. Thanks!
I use BBEdit and drag the folder from the Finder into the BBEdit document and it does the indenting fro subfolders etc. automatically.
Thanks Gary, I love it when you get us involved in using the Terminal and Shortcuts, and this was a great application. I had one problem: Using Sonoma 14.4.1 and the zsh shell: I had to put double quotes around the SED command: sed -e "s;[^/]*/;\t;g"
Single quotes would not work.
Dear Mr. Gary;
Enough of this please try app Print Window 5.app @ App Store ; i have been using this for years and it has multiple formats for files listings on you mac.
Thank me now or later.
Note: you have been around for a number of years and appreciate your MacMost.com website
As Al LaPierre pointed out, running Sonoma 14.4.1, the single quotes do not work; but unlike him, even the double quotation marks do not work. I get the following error message:
sed: option requires an argument -- e
usage: sed script [-Ealnru] -i extension]
[file ...]
sed [-Eainu] [-i extension] [-e script] ...
[-f script_file] ... [file ...]
Akiva: Are you sure you are using zsh, not bash or something else?
Is there a reason why the input can't be right clicking a location in Finder? This seems to me to be the most logical input.
David: Go ahead and try that. I did and I got inconsistent results so I opted for this method.
I am wondering why Apple cannot implement this function that I have been asking for many years. For the money they charge, this and many other features and functions should be available and easy to use....
Good info Gary. Here's links to Homebrew and the 'Tree' formula you can easily install via Terminal - I think they're likely pertinent, from what Gary mentioned in this video (does similar things, just showing differently - another video idea, lol!):
https://brew.sh
https://formulae.brew.sh/formula/tree
Thanks for your amazing work as always!!! You are a "life" savior!!! Help me out a lot!!! Everything im learning on MacOs its with you Gary!!!
Good and useful information. I cannot seem to get the copied files as a listing in the text application. It keeps wrapping the copy. Is there a text edit setting I should have in place? I've tried a number of adjustments. Running latest version of Sequoia. All advice appreciated, thanks!
Greg: Not sure what you mean. Is it that you are not getting the file listing, or that the paths are too long for the lines so they wrap to the next line (as text would normally do)?
Yes, it was the path copied version. It is more like there is no carriage return on the pasted files. I've widened the text window but it doesn't seem to help.
Greg: Are you pasting in TextEdit? Have you tried it in plain text mode, as well as in rich text mode? How about if you paste into Pages or Notes?
Gary,
I am using textedit and checked it for plain text and the character sizing (180). It still seems to wrap all the text without a line break as it shows in the video. I checked in Pages and Notes with no luck. I've also made sure that I'm using the view option (list) to have it almost exactly as you show in the video. Is it possibly some setting on Finder or TextEdit that I'm not catching? Everything works it just is a pain for the "unwrap" cleanup. Thanks for the persistence!
Greg: Perhaps I'm not understanding your issue. Try asking in macmost.com/ask with a screenshot later.