Syntax
MountVolume Zone$, Server$, Volume$ [, User$] [, UserPassword$]
[, VolumePassword$]
MountVolume(Zone$, Server$, Volume$ [, User$] [, UserPassword$]
[, VolumePassword$])
Remarks
On the Macintosh, the MountVolume statement connects to a disk or folder shared across the network.
Argument | Explanation |
Zone$ | The zone that the computer you want to connect to is in. |
Server$ | The name of the computer. |
Volume$ | The name of the shared disk or folder. |
User$ | Your user name, as registered by the shared computer. If you do not specify a user name, you are connected as a guest. |
UserPassword$ | The password, if any, required to connect to the specified computer. |
VolumePassword$ | The password, if any, required to access the specified disk or folder. |
The MountVolume() function behaves the same as the statement, and also returns one of the following values.
Value | Explanation | |
0 (zero) | The instruction was successful or the connection already exists. | |
–28 | AppleTalk is not available (for example, your computer is not connected to a network). | |
–35 | The specified volume was not found. | |
–50 | The instruction contains and invalid argument (for example, the zone, server, or volume name is missing, or the user name is not recognized). | |
–58 | An external file system error occurred. | |
–108 | There was not enough memory to make the connection. | |
–5000 | Access was denied. | |
–5002 | The method used to authenticate the user is unknown. | |
–5003 | The AppleTalk Filing Protocol (AFP) on the server is incompatible with MountVolume. | |
–5016 | The specified server is not responding. | |
–5023 | The user was not authenticated; this usually occurs because the password is incorrect. | |
–5042 | The password has expired. | |
–5061 | The computer is already connected to the maximum number of volumes. | |
–5063 | The specified server is the same as the computer running the instruction. |
Note
MountVolume cannot connect to volumes that the Finder cannot connect to using an alias.
In Windows, MountVolume and MountVolume() are not available and generate errors; use Connect instead.
Example
This example connects to a shared folder as a guest:
MountVolume "Public", "Tools", "Art Tools"
See Also
Connect