Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

IVA. / NVA. - If-Volume Available

Previous Top Next


MiniRobotLanguage (MRL)

 

IVA. Conditional Statement

If Volume available

 

 

Intention

 

This command can be used to find out, if a specified Volume (Drive-letter) is available.

 

' Test if Volume e: is available

IVA.e

 DMP.6

 MBX.!

EIF.

 

You will find the current usage on the TOS. In this case, E: is a CD-Rom or optical drive.

 

graphic

 

For a Network Drive you will get this.

 

graphic

 

and for a local Drive this:

 

graphic

 

You can specify the driveletter with- or without a ":" and in lowewr or in upper case.

 

IVA.Z:

 ' Show TOS

 DMP.6

 MBX.!

EIF.

 

As a Bonus, you can also use the command like this:

 

$$PAT=\\PCNAME\Folder$

IVA.$$PAT|$$ERG

  PRT.$$ERG

  MBX.!

EIF.

ENR.

' Result could be "z:"

 

 

NVA. is the negative version of IVA.

 

 

 

Syntax

 

 

IVA.P1[|P2]

 

 

Parameter Explanation

 

P1 - driveletter, with ":" or without ":".

        Alternative you can specify a path of a mapped drive to return the drive-letter.

 

P2 - (optional) - Variable for the result. If omitted TOS is used.

 

 

 

 

Example

 

'*********************************************

' IVA. - Sample

'**********************************************

IVA.e|$$ERG

  PRT.$$ERG

  MBX.!

EIF.

ENR.

 

'*********************************************

' IVA. - Sample 2

'**********************************************

$$PAT=\\PCNAME\Folder$

IVA.$$PAT|$$ERG

  PRT.$$ERG

  MBX.!

EIF.

ENR.

' Result could be "z:"

END.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.6.1. Program Flow Control

    GVL. - Get Volume List

    MND. - Map Network Drive

    CNS. - Connect Net Share

    RDM. - Remove Drive Mapping

    GIP. - Get IP Adress

    GUN. - Get User Name

    GNS. - Get Network Share