Remove missing file references from bookmarks

I recently migrated to a new Mac and used a backup of Hookmark settings. Now there are a bunch of file bookmarks that are broken. Hookmark hangs while trying to find them. Is there anything I can do to remove broken file references without losing all my URL bookmarks? Can I manually edit the bookmarks via text editor?

I’m running v 5.0.2 via Setapp.

Hi, It shouldn’t hang. Are some of your files on a NAS?

However, you can use export/import to prune your hook://file/ links.

Thanks, for the import/export tip.

Not NAS, but some of them are files in OneDrive. And I did switch from a Intel Mac to Apple Silicon, and lastly from a Hookmark licensed version to a Setapp licensed version.

to clarify, if I import will it overwrite or merge the results with existing links? I.e., should I reset the application before importing.

Interesting (to me) update, the export didn’t include any of the missing files. It took a substantial amount of time to export so I wonder if Hookmark was trying to find the file and timed out, then excluded it from the export.

After returning to Hookmark and looking through my links I still saw a few links that say ‘Trying to locate file…’ if I leave the view open the message eventually changes to ‘cannot locate file at:…’ message. If I click one to see if I can delete it, the app hangs with spinning beach ball. And by hang, I mean the app becomes non-responsive (modal) but does eventually respond again.

I’m on an M2 Max with 32 GB of RAM so I’m surprised it’s taking as long as it does to time out on a missing file.

I guess my only recourse is to reset the app and import my export.

As you will have noticed the dialog box says:

All current Hookmark links will be removed and replaced with the imported file. Are you sure you would like to proceed?

This command deletes all your current links and replaces them with the content of the
imported file. However, links to missing files will not be imported. Therefore, to
ensure all links in the import file are restored, please ensure their targets are currently
accessible. This may involve remounting or synchronizing mobile storage devices (USB
drives, etc.), disk images (.dmg files) and shared folders (Dropbox folders, iCloud, etc).
Also, please ensure that Spotlight is indexing files and folders containing Hook-linked
files.

correct, as the dialog box says:

However, links to missing files will not be imported.

is this happening for all files or just a few?

Please try to answer the questions and follow the instructions to help us identify the problem:

  1. How many file links are there in Hookmark?

  2. Did you try to delete those files right after import or Hookmark starts? Right after start, Hookmark may be still doing some checks in the background even though it responses to user’s input. This can cause UI freezing.

  3. Did you have Sync feature turned on? Hookmark periodically checks if there anything to sync, this can add extra load but should rarely cause problem.

  4. Was there any other program actively changing (copy/remove/create) files when the problem happened? This can affect Hookmark.

  5. Where are those files referenced by broken file links originally located?

  6. OneDrive can be slow to access if files on-demand is enabled. If the referenced files of the broken links are on OneDrive, You can go to Hookmark->Preferences->Advanced, temporarily add OneDrive path so Hookmark won’t look into OneDrive folder while trying to resolving a broken link. After you delete broken links, remove the added folder.

  7. When Hookmark freezes on deleting a broken link, please take a sample of the Hookmark process by following https://hookproductivity.com/help/more/how-to-take-a-process-sample/ and send to us. This would help us to see the problem.

Thank you.

I hadn’t clicked the import button yet, thanks

Just a handful of instances now

Got it, I missed that detail. thanks

  • How many file links are there in Hookmark?

2-3

  • Did you try to delete those files right after import or Hookmark starts? Right after start, Hookmark may be still doing some checks in the background even though it responses to user’s input. This can cause UI freezing.

No I waited until after the app tried and failed to locate the files

  • Did you have Sync feature turned on? Hookmark periodically checks if there anything to sync, this can add extra load but should rarely cause problem.

I did have the sync feature turned on

  • Was there any other program actively changing (copy/remove/create) files when the problem happened? This can affect Hookmark.

No other notable file activity (could be normal system operations)

  • Where are those files referenced by broken file links originally located?

Some are files that do not exist on the new Mac in a standard folder (e.g., Downloads). Some are in OneDrive

  • OneDrive can be slow to access if files on-demand is enabled. If the referenced files of the broken links are on OneDrive, You can go to Hookmark->Preferences->Advanced, temporarily add OneDrive path so Hookmark won’t look into OneDrive folder while trying to resolving a broken link. After you delete broken links, remove the added folder.

I will try this.

Sure, I’ll send via PM

Just checking back to see whether the above helped.

Another equivalent approach would be:

  1. quit Hookmark.
  2. turn off OneDrive for a moment
  3. launch Hookmark
  4. In Hookmark use via ⌘F to find the problematic bookmarks that are or were in OneDrive
  5. delete the bookmarks
  6. relaunch Hookmark

By the way, on our Link-friendly Mac Apps – Hookmark page, we write:

I don’t know if that helps.

We regret the inconvenience/time this has cost you, and we appreciate you providing all that information.