Find & Replace in All Notes

@itpropaul

I am not in position to test this so it is only a suggestion to consider. Try it only if you are feeling confident.

This uses the idea put forward by @cweinhofer above.

Rather than work on the sync or .config/joplin-desktop folders it may be possible to:

  • export all notes as “File > Export > Raw - Joplin export directory”, you will get a folder full of .md files and a sub-folder full of resources,
  • use Notepad++ on the exported folder (Search > Find in files) to replace the unwanted text with nothing,
  • if happy, set up Joplin on another machine or VM and do not connect it to your sync target,
  • import the modified notes into this testing Joplin setup using “File > Import > Raw - Joplin export directory”,
  • go through your notes in this test setup and make sure that everything is behaving itself,
  • if everything is mangled it’s probably best to give up at this point!
  • if all is fine, delete all notes from the live Joplin and let it sync,
  • possibly go to your online storage provider and delete out anything that remains (not the target folder itself),
  • import the modified notes back into live Joplin using “File > Import > Raw - Joplin export directory”
  • sync

This sounds like it could work as long as the string used for the find value in Notepad++ could not be anything else other than the text sought i.e. a not string that could be required in other contexts in notes or used in metadata files (filename would not be a good choice!).

Created with Microsoft OneNote 2016 seems to be a suitable string to use. In fact before starting look at the Markdown for this sentence so if it is ## Created with Microsoft OneNote 2016 or *Created with Microsoft OneNote 2016* you can use that as the search string (see warning below).

It is assumed the replace value would be blank/nothing.

Things to consider:

  • A JEX - Joplin Export File backup is REQUIRED before trying this. Put it somewhere safe. This could easily go very very wrong.
  • Only try this if you are good at setting up Joplin from scratch on all clients and setting up the sync all over again. You could possibly need to do this just to get back to where you started!!
  • DO NOT set the find / replace options in Notepad++ as RegEx. If you do and then try to replace a Markdown sentence set as italics the last characters may be .*. This is also valid RegEx and means that Notepad++ would replace whatever string you are searching for AND EVERYTHING ELSE AFTER IT. Needless to say this is not a good thing,
  • Probably best to also set the find / replace not to be recursive so it does not search through the resources folder as well, finally,
  • Do you really want to do this or could you just delete Created with Microsoft OneNote 2016 every time you encounter a note with it in. Over time they will all go and any left will only be on notes you have never re-read!!!
4 Likes