I went through and "upgraded" many of my existing long-term MP3s in my Library to FLAC a little while back. I had a very large set of MP3 files in my library from way back in the day when a 100GB drive was a monster. Because of old-school space constraints (that were no longer an issue) many of my very old files (circa 1998/1999-ish, mostly) were ripped at 128k CBR MP3 (by Real Jukebox mostly, I believe), back when I did my "first round" of ripping from my CD library. Over this past summer, I went through and re-ripped most of these discs (the ones I still had) to FLAC or very high quality MP3s.
Here's the basic process I used:
Re-Ripping to MP3
This is a slightly easier process than re-ripping to FLAC, so I'll start with it. I did this, mostly, one album-at-a-time. In a few cases, where I ripped a bunch of stuff from the same artist (my entire nine inch nails collection, for example), I was able to combine the procedure and do a whole artist at a time, but you have to be careful not to mess it up. It is absolutely a very good idea to make a manual Library Backup before you start this process, just in case.
0. Make sure Auto-Import is disabled in MC for the process. Auto-Import WILL get in the way of this, so it is essential to ensure that it is turned off.
1. Set up MC to rip to a Temp location (M:\temp\rip\ in my case), and set my ripping folder naming structure so that it will match my main library file structure exactly (so the output file names will match the existing file names perfectly).
2. Rip the files to the new MP3s. This creates "duplicates" in my library, one in the M:\audio\music directory (the old, bad ones) and the new ones in the M:\temp\rip\ directory.
3. Switch to a view that shows these files together (browse to find the Artist\Album is usually the easiest way), and make sure they are all tagged identically and that the filename structure matches identically (except for the rip location prefix, of course). This was actually quite easy to do, since the normal sorting in the view made them line up with each other. Basically, I just had to make sure the files were named the same way. This amounted to making sure that "Oh! Darling" by The Beatles wasn't called "Oh Darling" instead in the new ripped version, and fixing it if they didn't match.
4. If needed, I did a Rename Move and Copy on the newly ripped files, keeping them in M:\temp\rip. The goal is to get the filenames to match exactly, so that you can just replace the old ones with the new ones via Windows Explorer and have the new ones overwrite the old ones.
5. Then, when you're sure everything is "good" I did a Locate -> On Disk (External) to both to pop up Windows Explorer windows showing both the new files and the old files.
6. I then removed the "new files" from MC's Library completely. This was easy to do in that same view: I just sorted them by [Filename], then selected all of the M:\temp\ ones and deleted them (but not from disk).
7. I then moved the files from the M:\temp\rip\ directory (the whole folder) over to M:\audio\music\. This replaced the old files on disk.
8. Now, the files in MC's Library actually point to the new, higher quality files, but it doesn't know it yet, and the tags are out of "sync" (not the main ones that are used for naming, but the other stuff like [Number of Plays] and [Date Imported] and whatnot).
9. Then, I selected the files (still open in the view in MC from above) and did Library Tools -> Update Tags (from Library). This synced the Library Data from MC back out to the actual in-file tags on disk for the new files. Make sure to pick the right tool! You want to update the TAGS, not the Library in this step. If you do the reverse, then MC will replace all of the old tag data in your Library with the tag contents from the files themselves (which will be all brand-new). If you mess this up, your only option is to restore a MC Library Backup and start over.
10. Then, I did Library Tools -> Analyze Audio (making sure to uncheck the skip already analyzed files option). This corrects the reported bitrate, file size, and audio analysis details for the files, so that they actually match the files on disk.
11. Lastly, I did Library Tools -> Update Library (from Tags). This was probably unnecessary because of the Analyze Audio step, but I did it anyway for good measure.
There, then you have replaced the files on disk while preserving the important file tags. An annoying process, to be sure, but we don't have any automated way to replace files on disk built-in to MC, so that's the best you can do. For the vast majority of re-ripped albums, this was a very quick process. So long as your [Name] tagging data isn't heavily customized from what YADB finds, it shouldn't be too troublesome (those [Names] matched correctly far more than they were mismatched).
Re-Ripping to FLAC
This process followed exactly the same procedure as described above, except that I ripped to FLAC, up until step 4.
4. In this case, after I was sure the tag data that would be used to rename the files matched exactly, including commas, dashes, colons, and whatever else weird might be in the names of the songs, I did a Rename, Move, and Copy on the new FLAC files to move them right next to the existing MP3s (this was easy, I just used my existing "music" renaming preset). This resulted in the folder where the original MP3s lived containing both the original source files, and the new FLAC files, right next to one another, named IDENTICALLY except for the file extension.
5. Do a Locate -> On Disk (External) to pop up a Windows Explorer view of those files, and just make sure that everything looks right. Each file should have the "original" MP3, with a "new" FLAC right next to it.
6. I then removed the "new files" from MC's Library completely. This was easy to do in that same view: I just sorted them by [File Type] (instead of Filename since they are all in the same place now), then selected all of the FLAC ones and deleted them (but not from disk).
7. Then, select all of the remaining files listed in MC for that album, and do Rename, Move, and Copy on them.
8. Change the Rename tool's mode to Update Database to point to the new location mode. This is essential!
9. In the bottom of the Rename tool's dialog, use the Find & Replace, enter .mp3 in the top box, and then .flac in the bottom box. When you run this, it will change the extensions in the Library from MP3 to FLAC without messing with the files on disk at all (assuming you did change the mode in step 8 above). Make sure none of the other options in the Rename tool are enabled. You just want to change the [Filename] tag in the MC library for all of those files to make them point at the new FLAC files instead of the MP3 files.
10. Run the Rename tool. This will fix MC's library to be pointing at the FLAC files. You can then delete the old MP3 versions out of Windows Explorer.
11. Complete steps 9-11 in the procedure above. This will "fix" the files' tags, and also fix the MC Library to "know" that the files are now FLAC files, have the right File Size and bitrate characteristics, and reanalyze the new versions (the results did change, I verified it).
It is an annoying and slow process, but one you can accomplish without too much trouble if you are systematic about it. I tended to rip 5-10 discs at a time, and then get them all renamed/fixed, and then rip some more. It took quite a few days to update the 2-3K files I wanted to re-rip (or re-buy, the same exact process works if you are downloading the new versions from Amazon or some other source instead, which I did for things were my original source discs were missing or damaged), but I got through it in one piece.