How to change only the root of the paths

Hi all,
there is a script that change all the internal paths of materials inside .max file?
Examples:
E:\ folder\texrure.jpg become \server\folder\texture.jpg
E:\ other_folder\other_texture.jpg became \server\ other_folder\other_texture.jpg

Basically I would like to change only the root of the paths.

I use Asset Tracking toggle inside max but is not so usefull for that specific function.

thank you