Editing Firefox Bookmarks

I’ve been using Firefox full-time since 2003 or 2004, and have amassed a pretty large collection of bookmarks. I’m also one of those guys who regularly has 150+ tabs open across 3-4 Firefox windows.

Of course, when you have that many tabs open for a week, Firefox tends to hog up a TON of RAM. So what I sometimes do is bookmark all the tabs in one (or more) window(s) by clicking a tab, choosing “Bookmark All Tabs” and saving the folder as “2012.09.17a” (or whatever the date is; the letter is if I have more than one window to save). I save this in a bookmarks sub-folder called “Sessions”.

An odd thing happened recently: I was using Firefox with 100+ tabs open (like you do) when the Firefox window suddenly “blinked”, as if Windows was having trouble redrawing the window. I didn’t think much of it until a few minutes later, when I noticed that a giant chunk of my bookmarks were missing! There hadn’t been any kind of error message or notification; the stuff was just gone. I bookmarked three of my four open windows in my “Session” sub-folder, then exported the remaining bookmarks to an HTML file, and restarted Firefox… and my bookmarks were still missing.

Getting most of my missing bookmarks back was easy. Firefox keeps backups of your bookmarks, so all I had to do was open the bookmarks manager and choose “Import and Backup” > Restore and choose the day before:

ff_books_restore

But the previous day’s backup did not include the session windows I’d just bookmarked. I checked History > Recently Closed Windows, but the windows I’d bookmarked only a few minutes before weren’t there, only a couple of windows I remembered closing a few days before.

The bookmarks for those three windows were “trapped” in the BOOKMARKS.HTML file I’d saved before I started all this. How could I get them back?

Well, I could always open a new Firefox window, open the BOOKMARKS.HTML file with that, and manually re-open each tab. But that seemed like a huge pain in the ass: I’d bookmarked three windows with 120+ tabs. Manually clicking each link in the BOOKMARKS.HTML file and saving it all over again seemed laborious.

I could have also manually edited the BOOKMARKS.HTML file in a text editor. But when I opened the file in Notepad++, I found that it’s not exactly human-friendly:

ff_books_html
(click to embiggen)

So… what to do?

In a flash of inspiration I thought of it: Internet Explorer! I opened a Windows Explorer window and created a folder on my desktop named “Temp Faves”. I then went to the favorites folder in my profile (c:\users\&username&\Favorites) and moved the few IE bookmarks I have to the temp folder on my desktop. I then had IE import the bookmarks from the BOOKMARKS.HTML. Going back to the Windows Explorer window, I deleted all the new “Favorites” except for the “session folders” I’d saved just before this whole mess started. I then went back to Firefox’s bookmarks manager and told it to “Import Data from Another Browser”, choosing only to import my IE favorites. Firefox imported them into a folder called “Favorites from Internet Explorer” (or something like that). I then used Firefox’s bookmark manager to move those sub-folders to their rightful place in the “Sessions” folder of my bookmarks. I then deleted the “Favorites from Internet Explorer” folder… and BOOM! In the most roundabout of ways, I was back where I had been before!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.