Resolve Windows drive letter to a path (subst and network)
问题 I wonder if there is a universal way of resolving a path using a drive letter (such as X:\foo\bar.txt ) into its equivalent UNC path, which might be one of the following: X:\foo\bar.txt if X: is a real drive (i.e. hard disk, USB stick, etc.) \\server\share\foo\bar.txt if X: is a network drive mounted on \\server\share C:\xyz\foo\bar.txt if X: is the result of a SUBST command mapping X: to C:\xyz I know that there are partial solutions which will: Resolve a network drive (see for instance