fmConnectLocal

Purpose:

Open a connection to the local file system. This action establishes an off-screen connection to the local file system. To display a visible Windows Explorer style File Browser, use the fmShowFileBrowser action.

Category:

Connection

Syntax:

fmConnectLocal "connection id" "properties"

connection id

A name that you want to use to refer to this connection in the future. This cannot be left blank.

properties

This is a compound parameter and can contain any combination of the following items:


InitialPath=value

The folder to navigate to once the local connection is established. Leave this parameter blank to navigate to the Windows "Desktop" folder.


Example:

The following example opens a local file system and navigates to the "C:\Windows" folder:


fmConnectLocal "Local1" "InitialPath=C:\Windows"


fmConnectRemote

Purpose:

Open a connection to a remote FTP server. This action establishes an off-screen connection to the FTP server. To display a visible Windows Explorer style File Browser, use the fmShowFileBrowser action.


Note: The fmConnectRemote action can also be used to reestablish a connection unexpectedly closed by a server. When used to reconnect, the host and properties fields are ignored.

Category:

Connection

Syntax:

fmConnectRemote "connection id" "host" "properties"

connection id

A name that you want to use to refer to this connection in the future. This cannot be left blank.

host

The IP address or host name for the remote FTP server.

properties

This is a compound parameter and can contain any combination of the following items:


User=value

The user/account name required when logging into the FTP server. For anonymous file transfers, the user name should contain the value "anonymous".

Password=value

The password required when logging into the FTP server. The password for anonymous logins is typically your email address, but check with the site administrator to be sure.

Port=number

The port number to use when opening the connection to the FTP server. Most FTP servers use port 21.

Passive=yes/no

Yes = connect to the server using passive mode. No = connect to the server using normal mode.

Timeout=value

Use timeout to define how many milliseconds to wait for the server to respond before giving up. The default timeout is 60000 milliseconds (1 minute).

InitialPath=value

The directory on the server to navigate to once the remote connection is established. Leave this parameter blank to display the default/root directory.

LogLimit=value

This value represents the maximum length of the [ID.Log] variable, which contains a log of messages sent to and from the FTP server. The [ID.Log] variable will be truncated (from the beginning) to keep the log below the limit specified here. Use LogLimit=0 (the default) if you do not want the log trimmed.

KeepAlive=value

Most FTP servers will automatically terminate a connection that is idle for a preset period of time (usually 30 to 60 seconds). KeepAlive can be used to periodically "ping" the server to prevent the connection from being terminated. Set keepAlive to the number of milliseconds of inactivity the program should wait before pinging the server. (60000 milliseconds = 1 minute.) Use keepalive=0 (the default) to disable this feature.


Separate multiple items in a compound parameter with semicolons (;).

Example:

The following example connects to a FTP server at the fictional www.mywebsite.com and navigates to the "/webspace/httpdocs" folder:


fmConnectRemote "Remote1" "ftp.mywebsite.com" "User=admin;Password=fjx4mhc2;Port=21;InitialPath=/webspace/httpdocs"


fmDisconnect

Purpose:

Close a previously opened FTP server or local file system connection. Calling fmDisconnect is optional since any connections that are open when a publication is shutdown will be closed automatically.

Category:

Connection

Syntax:

fmDisconnect "connection id"

connection id

The name assigned to the connection you want to close.

Example:

fmDisconnect "Remote1"