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

Oneechan69

macrumors 6502
Original poster
Mar 29, 2022
281
33
US
On a browser like Firefox, I can go to the bookmarks menu and select multiple bookmarks with the shift key, then press CMD C to copy them, but doesn't work on macOS. I wonder if there's a more efficient way to do so.
 
Indeed... I never knew that Safari (now) had this limitation, until you mentioned it today. In much older versions of Safari, bookmarks used to display as a table view onscreen, and I suspect that it might have been possible to drag and drop at least one if not multiple items off the list, although I can't be sure anymore.

A workaround you could use:
  1. In Safari, click "File" > Export > Bookmarks..., and select a location for export.
  2. Open the exported file (it should open in Safari, as it's a standard HTML file).
  3. Select the items you want and click+drag the selection off to the desktop.
    This will generate a .textclipping file.
  4. Open the .textclipping file and click on the links as desired.
It's sort of a clumsy, poor-person's way to do what you want, but it has the advantage of getting your bookmarks into a format where you can edit and use only the ones you want, and then open the .textclipping file when you want to open these websites.

Of course, maybe this isn't why you wanted to copy them in the first place, but at least it's a way to handle them in a somewhat more flexible format, meaning text. 😛
 
Bookmarks > Edit Bookmarks (⌥⌘B), press ⌘. select multiple bookmarks, ⌘+C
This doesn’t work in macOS 12 Monterey. When you click on a bookmark, it automatically opens, rather than being simply selected.
 
Sorry, I should have said press and hold ⌘. Demo in Monterey 12.4 (21F79) Safari 15.5 (17613.2.7.1.8)
View attachment 2009986
Ah, thanks for that. That was the problem—I was accessing the bookmarks from the sidebar (and the bookmarks are non-selectable there), and not from the Edit Bookmarks menu. It does indeed work on macOS 12.4, Safari 15.5 as you say. Hopefully the OP will get that as well.
 
I got that working for me, but ideally I'd like to copy just some of the URLs, is there a way to do so.
 
Have u tried this yourself? I created a txt file in textedit and tried pasting multiple bookmarks into it from the Edit Bookmarks menu, and it only pasted in the titles.
 
Have u tried this yourself? I created a txt file in textedit and tried pasting multiple bookmarks into it from the Edit Bookmarks menu, and it only pasted in the titles.
Actually, as I have TextEdit set to always use plain text, that was the first thing I tried and it worked.
Monterey seems to have a problem with the clipboard. One link is copied correctly, but multiple links are pasted as text, although the last URL shows up in Finder – Edit – Show Clipboard. And AppleScript shows….
 
  • Like
Reactions: Slartibart
Here's a video where I paste the URLs in both rich text and plain txt, I'm on Monterey.
Yes, I’ve seen the same behavior in Monterey, as explained above.
What exactly do you need the links for?
Here is a quick way to export Safari’s Bookmarks.plist as plain text from Terminal
Code:
defaults read ~/Library/Safari/Bookmarks.plist >> ~/Desktop/Bookmarks.txt
You can open the Bookmarks.txt saved on your desktop and search for the bookmarks/links.
Here is how MacRumors appears in mine
Code:
                            URIDictionary =                             {
                                title = "MacRumors Forums";
                            };
                            URLString = "https://forums.macrumors.com/categories/macos.182/";
                            WebBookmarkType = WebBookmarkTypeLeaf;
 


AppleScript:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "AppKit"
use scripting additions

-- classes, constants, and enums used
property NSPasteboard : a reference to current application's NSPasteboard

set supDataTypes to NSPasteboard's generalPasteboard()'s types()
if supDataTypes's containsObject:"WebURLsWithTitlesPboardType" then
    set pbArray to NSPasteboard's generalPasteboard()'s propertyListForType:"WebURLsWithTitlesPboardType"
    set URLarray to pbArray's objectAtIndex:0
end if

if URLarray is not {} then
    set ASTID to text item delimiters
    set text item delimiters to linefeed --"\n"
    set the clipboard to (URLarray as list) as string
    set text item delimiters to ASTID
end if

Info : Tested on Mojave
 
The script works for me too, thanks! I'm gonna put it in a Shortcut with the action "Run AppleScript with" and leave a .app shortcut to the shortcut, in a folder pinned to my dock.
Screen Shot 2022-06-08 at 6.12.29 PM.png

Screen Shot 2022-06-08 at 6.12.44 PM.png
 
Last edited:
  • Like
Reactions: kryten2
Actually, as I have TextEdit set to always use plain text, that was the first thing I tried and it worked.
Monterey seems to have a problem with the clipboard. One link is copied correctly, but multiple links are pasted as text, although the last URL shows up in Finder – Edit – Show Clipboard. And AppleScript shows….
View attachment 2010728
@bogdanw I just looked back at this and I wonder, how did you get that clipboard window at 0:27?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.