To get the job done, the filenames of the new files must exactly match the filenames of the old files. For re-ripped cds, that shouldn't be too hard to achieve.
The link at the end assumes that the file
type is the same as the original poor quality files. If you're ripping to a different format, then before you replace the files using explorer, you must use MC to change the file extensions of the existing files. If the format is the same, skip straight to the link.
1st, and very important, make sure that Auto-Import is
not watching the folders that the original files are saved in. You absolutely do not want its involvement during this job.
If you ripped the new files using MC (and why wouldn't you) select them all and remove them from the library.
Select the old files in MC, right click, library tools, find and replace.
In the dialogue that opens, click on the "Select none" button, then scroll down and place a tick beside 'Filename'
In the "Find What" field, type .mp3
In the "Replace" field, type .<new file extension>
Now the old files match the new files, and you can follow the steps outlined in the linked post.
EDIT: forgot link (thanks Alex!)
http://yabb.jriver.com/interact/index.php?topic=35907.msg244673#msg244673