Copy a list of file names and enter them in Numbers Cells

I have a folder with about 30 large video files, each with a distinctive title.


I'd like to copy the file names (with a screenshot?) and enter each file name in a different Numbers cell. I want to send the spreadsheet to someone else to review and check off the titles no longer needed so I can delete the files and free up storage.


I hope there's a way to do this without retyping all the file names into Numbers!


Suggestions?


Thanks,


Dick

Mac mini (M4)

Posted on Jul 24, 2025 2:53 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 25, 2025 5:09 AM

You can use a short script for this:


  1. Copy-paste the script below into Script Editor (in Applications > Utilities)
  2. Select the desired files in Finder
  3. Click the triangle 'run' button in Script Editor
  4. Click a cell in the destination table in Numbers and command-v or Edit > Paste and Match Style.


(If results are split across columns, adjust the delimiter in the popup that appears)


SG



The script:


tell application "Finder"
	-- Get the selected files
	set selectedFiles to selection
	-- Extract file names
	set fileNames to {}
	repeat with aFile in selectedFiles
		set end of fileNames to name of aFile
	end repeat
end tell

-- Combine file names into a string for pasting
set AppleScript's text item delimiters to return
set the clipboard to fileNames as text



6 replies
Question marked as Top-ranking reply

Jul 25, 2025 5:09 AM in response to DHuitema

You can use a short script for this:


  1. Copy-paste the script below into Script Editor (in Applications > Utilities)
  2. Select the desired files in Finder
  3. Click the triangle 'run' button in Script Editor
  4. Click a cell in the destination table in Numbers and command-v or Edit > Paste and Match Style.


(If results are split across columns, adjust the delimiter in the popup that appears)


SG



The script:


tell application "Finder"
	-- Get the selected files
	set selectedFiles to selection
	-- Extract file names
	set fileNames to {}
	repeat with aFile in selectedFiles
		set end of fileNames to name of aFile
	end repeat
end tell

-- Combine file names into a string for pasting
set AppleScript's text item delimiters to return
set the clipboard to fileNames as text



Jul 25, 2025 5:13 AM in response to DHuitema

One way would be to use Textedit as an intermediary:

  1. Select the files in Finder
  2. Copy
  3. Paste into a TextEdit document pre-formatted as plain text (if not the default for new documents, use Format->Make Plain Text)
  4. Select the titles in TextEdit
  5. Copy
  6. Select a cell in Numbers (single click, not 2 clicks)
  7. Paste


Looks like a lot of steps but it is basically just two copy/pastes

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.

Copy a list of file names and enter them in Numbers Cells

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