Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_mapdrive( <cdrive> | <ndrive> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_MAPDRIVE( <cDrive> | <nDrive>
            [, <cNetpath> | .F. ] )


Parameters

<cDrive>
Drive letter (A-Z) to map.

<nDrive>
Alternative to drive letter. Drive number (1-26)

<cNetpath>
A full network path to map to the specified drive.

.F.   Delete mapping for the specified drive.



Returns

If <cNetpath> is omitted, then the current mapping for that drive is 
returned.


Description

<cDrive> can be a letter (A-Z) or a number (1-26). If it is a letter, 
all but the first character is ignored. Thus the colon (" : ") can be 
omitted. Case is ignored, as well.

<cNetpath> must be a full network path in the following format: 

           [server/]volume:[dir\subdir ...]

Server may be omitted if the volume is on the current server. The path 
must be mapped from the root directory on the specified volume.

If False is specified as the second parameter, then the mapping for the 
drive, if any, is deleted.

Note  Use N_MODENV() to add or remove a mapping from the search path.


Example

// Map H: to specified volume on server FS2 
cNetPath = 'FS2/SYS:APPL\USER\DATA'
N_MAPDRIVE('H:', cNetPath)

IF cNetPath $ N_MAPDRIVE('H:')
   // Display map
   ? N_MAPDRIVE('H:')
ELSE
   ? 'Error code: ', N_ERROR()
ENDIF
FS2/SYS:APPL\USER\DATA

// Delete map
N_MAPDRIVE('H:', .F.)



See Also: N_DRVTYPE() N_LOGIN() N_MODENV()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson