Tools@BasicAware

UNCFromMappedDrive

Purpose

UNCFromMappedDrive converts a (local) drive mapping to a network share/drive to its UNC path notation. Additionally an ERROR_LEVEL is returned for success (0) or failure (255).


Download

Command line application UNCFromMappedDrive


Installation

None. Download the ZIP file, extract the included executable and run it.

Please note: this is a console application. You should run it from a command prompt.


Use case(s)


Syntax

UNCFromMappedDrive <mapped drive/folder>

Examples

UNCFromMappedDrive W: (drive only)

UNCFromMappedDrive W:\MyData (drive & path)

The second example will expand the local drive letter to its UNC path and - for your conveniance - adds the additional file/path information to the UNC path. Let's say in the above example drive W: resolves to e.g. \\MyServer\MyNetworkShare, then W:\MyData will be resolved to \\MyServer\MyNetworkShare\MyNetWorkData\MyData.


Source code

The PowerBASIC source code is available at Github


Known issues / limitations


Version

16.05.2024

Navigation

Tools

Info

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Germany License .
All contents copyright © 2012-2024 by BasicAware, Knuth Konrad