Map Drive Action

Declaration

<AMNETDRIVE ACTION="text {options]" DRIVELETTER="text" NETPATH="text" USERNAME="text" PASSWORD="text">

See Also

Send Email, Dial Up, HTTP Download, Ping, HTTP Post

Description

Connects a drive letter to a network path or disconnects a currently connected drive from a network path. Some networks require a network user name and password to connect.

Practical Usage

Used to map a network share to a drive letter.

Parameters

General Tab

Action

Text [options], Required
MARKUP: ACTION="disconnect"

Specifies the action that should take place on the drive letter.

The available options are:

Drive Letter

Text, Required
MARKUP: DRIVELETTER="X:"

Specifies the drive letter that should be mapped or disconnected depending on the value of ACTION=.

Network Path

Text, Required
MARKUP: NETPATH="//SERVER1/Sharename"

Specifies a UNC (Universal Naming Convention - e.g. //SERVER1/Sharename) path to the network share that should be mapped. This option is only valid if the action parameter is set to "connect".

User Name

Text, Optional
MARKUP: USERNAME="MyUserName"

Specifies a valid network username that has access to map the requested share.

Password

Text, Optional
MARKUP: PASSWORD="mypassword"

Specifies a valid password for the user account specified in the User Name parameter [USERNAME=]. If the step is edited in Visual Mode the password is automatically encrypted.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMNETDRIVE ACTION="connect" DRIVELETTER="G:" NETPATH="\\server\Publicshare1" USERNAME="myusername" PASSWORD="mypassword">