Alter media data in bulk

Good morning.

I use Anki primarily in the Ubuntu desktop version (Anki 2.1.44), but lately I’ve gotten back to using Ankidroid, too. My problem is that I’ve been using a script to autogenerate mp3 recordings for new French words as I enter them (the gTTS module in Python 3), but this script writes those mp3s to a folder specific to my Ubuntu device ("/home/my_christian_name/French/mp3"). I should obviously have written them to the folder in my Anki directory, but now that I’ve made my mistake, I am wondering if there is a way to alter the directory on all the thousands of cards I’ve already entered - in bulk. Then, I would only need to transfer the mp3s over to the collection folder and it would automatically sync with Ankidroid.

I’ve considered exporting my French collection to a csv and then writing a Python script to alter all the directories before reimporting that csv. The only problem is that I will then lose scheduling data.

Is there another way?

Find&Replace in the Browse screen.

Thanks. I feel pretty foolish for so badly over-complicating this. I have a talent for re-inventing the wheel.

Now that you’ve explained that, another possibility arises: there were a few hundred cards for which I never downloaded the mp3, and I’d like to create all those mp3s in my script while finding a way to link them to the anki cards. Is there a way to find and replace all these words with strings that will include my mp3 file? For instance, “le pain”, becomes “le pain
[sound:le pain.mp3]”? I’ve tried using {{front}} as the search, for which the replacement would then be “{{front}}
[sound:{{front}}.mp3]”, but that doesn’t work. I realise there’s a long document explaining search syntax in Anki, but I didn’t find it helpful.

EDIT: Managed to achieve this, but only with a convoluted take on the Python method above.