Microsoft Operations Manager

GetFTPFile Method

The GetFTPFilemethod retrieves a file from an FTP server and saves it to the local hard disk.

[VBScript] INet.GetFTPFile(Host Variant,
RemoteFile Variant, DestinationLocalFile Variant, [AsciiText
Variant], [PortNumber Variant], [LogonUserID Variant],
[LogonPassword Variant], [AccessType Variant])

Parameters

Host
Name of the FTP server, such as ftp.microsoft.com.
RemoteFile
Path and name of the file to be retrieved from the FTP server.
DestinationLocalFile
Full path of the local file where the retrieved FTP file will be saved.
AsciiText
[True/False] Determines if the file should be transferred in ASCII or binary mode. This parameter is optional. The default value is False.
PortNumber
Allows specification of a port number other than the default FTP protocol port (21). This parameter is optional.
LogonUserID
User ID used while logging on to the FTP server. This parameter is optional. Leave this parameter blank to specify anonymous logon.
LogonPassword
Password used while logging on to the FTP server. This parameter is optional.
AccessType

Flags that specify options for an Internet connection. This parameter is optional. This parameter can be one of the following values:

INTERNET_OPEN_TYPE_PRECONFIG = 0 (default)

Retrieves the proxy or direct configuration from the registry.

INTERNET_OPEN_TYPE_DIRECT = 1

Resolves all host names locally.

INTERNET_OPEN_TYPE_PROXY = 3

Passes requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy. In this case, the function uses INTERNET_OPEN_TYPE_DIRECT.

INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4

Retrieves the proxy or direct configuration from the registry and prevents the use of a startup JScript (compatible with ECMA 262 language specification) or Internet Setup (INS) file.

Return Value

Boolean

Remarks

The INetobject should not be used when creating new scripts. It is included only to support existing scripts. For more information about equivalent APIs, see Using Operating System APIs in Scripts.

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

INet Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.