Copy real path from network path

If you don't want to go the easy route and hardcode the mappings, scripts can look up the list of shared folders and their real paths on the local machine using WMI's Win32_Share. So a script could walk through that list, compare prefixes of the current path with the share paths, and replace them with the local paths if they match.

An example of how to loop through all the Win32_Share items can be found here:

Another example here, in case that site goes down in the future: