Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sossity

macrumors 65816
Original poster
May 12, 2010
1,360
32
I have a bunch of photos on my mac, and I would like to copy the text or the file names of them all, not the actual photo files, and copy paste the file names into individual rows in a spreadsheet. Is there a way to do this? I am faced with going through all of them one by one, and selecting and copying each ones file name, and then pasting that into rows in a spreadsheet. I am looking for a way to avoid doing it like that, and be able to copy the multiple file names at once.
 

fatTribble

macrumors 68000
Sep 21, 2018
1,795
4,645
Dayton
It sounds like something you could write a Shortcut for. I believe the primitives are there to iterate through the files in a Files app folder. You should be able to get the name. I’m not sure how you’d output the name though. Maybe others can help.
 

dwig

macrumors 6502a
Jan 4, 2015
908
449
Key West FL
I use LibreOffice Calc for this type of thing on a regular basis. I simply select a range of files in Finder, copy (CMD-C), and paster (CMD-V) in a cell and that cell and those below it are filled with the filenames.

With some apps, you can use Edit>Paste Special>Paste as text (exact wording varies) to paster the filenames as text rather than pasting the images.

When the target app lacks a Paste Special function I use BBedit as an inbetween "translator" app. I copy and then paste into a BBedit document. I then select the pasted text in BBedit, copy, and then paste into my desired target app. BBedit can only paste text so it doesn't get confused with the files/images themselves.
 

Sossity

macrumors 65816
Original poster
May 12, 2010
1,360
32
This is how I do that:

Select all the files and copy. Open TextEdit and change the (new) document to Format>Make Plain Text. Paste into the document.

You can then select that text and paste it into a spreadsheet or wherever.
Thanks, that worked perfectly, and saved me a bunch of time going through and hand typing all this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.