Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Merge two Safari bookmark files together Web Browsers
So you know that the Safari bookmarks are kept in ~/Library -> Safari -> Bookmarks.plist. And if you move machines, you can always move the file to the new machine. But what if you want to merge the two bookmark lists? Well, there's the .Mac sync option - but quite a few folks don't have the day-to-day need or money for that. So what do you do? The following requires some knowledge of XML ...

[robg adds: I haven't tested this one, so if you're going to do so, make sure you back up your Bookmarks file first!]

First, back up the Bookmark list on the destination machine. Now boot up Safari on that machine, and add new folder in the left pane of the bookmarks. Call it something easy, and leave it at the end. Then quit Safari, and open the bookmarks list in a text editor. Go right to the end of the file, and find the lines that look like the following:

  </array>
  <key>WebBookmarkFileVersion</key>
  <integer>1</integer>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeList</string>
  <key>WebBookmarkUUID</key>
  <string>7AEA714C-428F-11D7-BC62-000393864EB4</string>
</dict>
</plist>
The numbers for the WebBookmarkUUID will be different for you. Just above that, you'll find the entry for the folder you created. Entries are of the form:

  <array>
       [The List here is the subfolders/bookmarks]
  </array>
  <key>Title</key>
  <string>ATitle</string>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeList</string>
  <key>WebBookmarkUUID</key>
  <string>5EE95354-82C7-11D7-A781-000393864EB4</string>
Now, the empty folder you created will not have an <array> </array> pair. This is where the bookmarks from the old machine will go. You don't want to copy the entire file -- at the top of the source file, make sure you miss of the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Children</key>
Then copy all the way from <array> down to the </array> near the bottom of the file, leaving out the following XML:

  <key>WebBookmarkFileVersion</key>
  <integer>1</integer>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeList</string>
  <key>WebBookmarkUUID</key>
  <string>7AEA714C-428F-11D7-BC62-000393864EB4</string>
</dict>
</plist>
Then save the destination bookmark file. A couple more bits to do...

The history and Rendevouz bookmark entries are special proxy entries, which need to be removed. Search for the second occurence of the string Address Book Bookmark Proxy Identifier. This is the occurence you pasted from the source file. The first occurence is the one you want to leave alone. Around this point, there are two XML dictionary entries which are the Address Book and the History. Remove the following code where you found Address Book Bookmark Proxy Identifier:

<dict>
  <key>Title</key>
  <string>Address Book</string>
  <key>WebBookmarkIdentifier</key>
  <string>Address Book Bookmark Proxy Identifier</string>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeProxy</string>
  <key>WebBookmarkUUID</key>
  <string>724DB68E-B7B6-11D7-A346-000393864EB4</string>
</dict>
<dict>
  <key>Title</key>
  <string>Rendezvous</string>
  <key>WebBookmarkIdentifier</key>
  <string>Rendezvous Bookmark Proxy Identifier</string>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeProxy</string>
  <key>WebBookmarkUUID</key>
  <string>724DBADD-B7B6-11D7-A346-000393864EB4</string>
</dict>
<dict>
  <key>Title</key>
  <string>History</string>
  <key>WebBookmarkIdentifier</key>
  <string>History Bookmark Proxy Identifier</string>
  <key>WebBookmarkType</key>
  <string>WebBookmarkTypeProxy</string>
  <key>WebBookmarkUUID</key>
  <string>724DBCC5-B7B6-11D7-A346-000393864EB4</string>
</dict>
Save the file, boot up Safari and check if it worked. If not, revert to the backup. You did follow that step, right? Finally, I think the WebBookmarkUUID entries are kind of hashed from the entry contents, so you should move the folder you created to somewhere else to cause hashes to be recalculated.

It sounds like quite the exercise to go through, but if you've got a work machine and a home machine with tonnes of collected bookmarks, it is well worth the effort. Very much a shame you can't export the bookmarks as IE format or whatever.
    •    
  • Currently 2.75 / 5
  You rated: 5 / 5 (4 votes cast)
 
[21,031 views]  

Merge two Safari bookmark files together | 8 comments | Create New Account
Click here to return to the 'Merge two Safari bookmark files together' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Merge two Safari bookmark files together
Authored by: CatOne on Jul 28, '03 12:29:43PM

It sure is a lot easier to do this if you have iSync and a .mac account... it's 100% fully automatic each time you synchronize ;-)



[ Reply to This | # ]
Merge two Safari bookmark files together
Authored by: notmatt on Jul 28, '03 05:14:02PM

Yeah, but if you only need to do it once a month (or less)... let's just say that's not quite worth the $8 a month that .mac costs.



[ Reply to This | # ]
Merge two Safari bookmark files together
Authored by: Han Solo on Jul 28, '03 06:08:36PM
I agree: .mac is much easier. Then again, some suitably clever (not me!) Unix programmer ought to be able to combine diff with some combination of grep, awk or sed, etc. -- with maybe some perl thrown in -- and bang: a script that can merge Bookmarks.plist files for less than $99 a year.

Anyone up for the challenge?

[ Reply to This | # ]

Bookit
Authored by: rtl on Jul 28, '03 10:29:01PM
I'm fairly happy with Bookit for my bookmark merging needs. With file sharing together with Bookit, you can merge two Safari bookmark files using a pretty well-designed GUI. Bookit's primary purpose is actually to sync the bookmarks between the various browsers many of us have installed on a single machine, but it's useful for syncing up multiple machines as well.

I actually use unison to move data between machines rather than file sharing, but that's a broader topic.

[ Reply to This | # ]

Bookit
Authored by: redAPPLE on Dec 28, '05 03:50:00AM

but does bookit also work with merging two bookmarks.plist (namely one from a different mac)?



[ Reply to This | # ]
Merge two Safari bookmark files together
Authored by: Fofer on Jul 29, '03 10:46:36PM

I just paid for URL Manager Pro after toying with it for years. It's got the ability to import from (and export to) any of the most popular browsers... even offers a system wide menu that can be shared throughout them all. (Therefore, no need to "synchronize" between browsers.) The best part is that it can also automatically check (and remove) duplicates, and check for outdated (read: "dead") links.

After moving from laptop to desktop, from MSIE 9 to MSIE X and then to Chimera, Navigator, OmniWeb, and Safari -- I had a lot of bookmarks to clean up and take care of -- and URL Manager took care of it.



[ Reply to This | # ]
Merge two Safari bookmark files together
Authored by: bignumbers on Oct 17, '03 01:10:31PM

I was trying to get this process to work, but Safari kept erasing the whole bookmarks file; I'd probably pasted something in the wrong place.

Anyway, I found a much easier way to make this happen - Copy and Paste. In my case I was moving from a G4 to G5, and wanted to get my bookmarks from the G4 into the G5 (and had already created many on the G5 which I didn't want to lose). Here's what I did:

Renamed bookmarks.plist to bookmarks-g5.plist
Moved the bookmarks.plist from the G4 into ~/Library/Safari/
Launched Safari
Selected the folder of bookmarks I wanted to move, and did Edit/Copy.
Quit Safari
Trashed bookmarks.plist
renamed bookmarks-g5.plist back to bookmarks.plist
Opened Safari
Selected the bookmarks folder
Hit Edit/Paste
Voila - the bookmarks pasted right in. Done.



[ Reply to This | # ]
Merge two Safari bookmark files together
Authored by: leadegroot on May 08, '06 01:30:43AM

This didn't work for me - my plist files were full of rubbish rather than plain text :(
I ended up dropping all the bookmarks in plist 1 that I wanted in one folder and dragging it to the desktop. Then I quite safari, swapped the plist files, restarted safari and created a new folder, than dragged the folder from the desktop into the new folder.
Woohoo!



[ Reply to This | # ]