13.2 VolumeMgr Object

The top-level object of the VolumeMgr UCX component used for retrieving information about NetWare volumes.

13.2.1 Volumes property

Returns an iterator for volumes on a server.

Syntax

object.Volumes

Type

Volumes.

Attributes

None.

Example

This example returns an iterator for volumes on the mounted server.

’Get all the volumes on this server 
Set volmgr = CreateObject ("UCX:VolumeMgr") 
Set Vols = volmgr.Volumes 
Vols.Reset() 
While (Vols.HasMoreElements()) 
     Set volume = Vols.Next() 
     Print "The volume is: "&volume.Name 
wend

13.2.2 Mount method

Mounts the specified volume if it is not already mounted.

Syntax

object.Mount(
 VolumeName As String)

Parameters

VolumeName

The name of the volume to be mounted.

Return Values

Boolean. Returns TRUE if successful, else returns FALSE.

Example

This example mounts the volume Vol1 if it is not already mounted.

Set nds1=CreateObject("ucx:NWDIR") 
’Login to an account with supervisory rights 
nds1.login("admin","password") 
if (Err.Number=0) then 
’Mount vol1 
Set volmgr=CreateObject ("UCX:VolumeMgr") 
volmgr.Mount("vol1") 
If ( Err.Number <> 0) then 
 Print("Mount failed : " & Err.Number & " Description "   &Err.Description) 
Else 
 Print("Mount successful") 
endif 
 nds1.logout() 
Else 
 Print("Login Failed") 
Endif