Solution 1:

There was an old csccmd.exe utility in Windows XP that had functionality to do what you're looking for but it doesn't work with the new Offline Files (CSC) in Windows Vista and 7.

In Vista and Windows 7 Offline Files has a WMI API that can be used to manipulate the configuration in an automated fashion. I haven't used it but I strongly suspect this API will be the key to what you're looking for.

A search comes up with this script and its related blog entry, titled "Updating your Offline Files cache in Windows Vista to point to a new server" that I suspect will work fine on Windows 7, given the similarity with Windows 7 and Vista. The script basically amounts to some command line parsing and finally a call to the "RenameItem" method of the "Win32_OfflineFilesCache" WMI object. You could probably condense the script down into just a couple of lines (and add the necessary restart to make the rename actually happen) for your purposes.