Copy real path from network path

If I am in a folder that is a network path would it be possible to make a button that copies the selected file or folders' regular path on the computer? Thanks

The path as it would be on the remote computer?

You could write a script that does a search and replace, if you know the path for each share and build them into the script. But I don't think Windows provides a way to look them up automatically (at least, not that any remote account would typically have access to use).

No on the same computer I am currently on (technically the server).

Thanks

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:

Super helpful. Thanks