Welcome to the DevPower Web Site
  home   |  support   |  shop   |  downloads   |  about devpower 

DevPower FTP ActiveX Control Version 2.0.2 (17-Dec-01)

Copyright (c) 1998 - 2017 Steve Robbins All Rights Reserved.

Documentation

Properties

  • AdjustLocalFileTimes Boolean
    Specifies whether the times on downloaded files should be adjusted to that on the server.
  • AlwaysIncludeDirs Boolean
    Specifies that filtered listings should always include directories.
  • Asynchronous Boolean
    Specifies whether transfers are asynchronous (registered version only)
  • Connected Boolean
    Returns whether there is an active connection to a server.
  • CurrentDir String
    Returns the current directory on the remote server.
  • InternalStatusMessages Boolean
    Sets whether the control should raise internal status messages as well as server response messages through the ServerResponse Event.
  • LCD String
    Gets / Sets the default local directory for saving files to.
  • OptionConnectTimeout Long
    Gets / Sets the timeout for Connecting (see below).
  • OptionReceiveTimeout Long
    Gets / Sets the timeout for downloading files (see below).
  • OptionSendTimeout Long
    Gets / Sets the timeout for uploading files (see below).
  • Server String
    Returns the currently connected server name.
  • TransferType Integer
    Gets / Sets the file transfer type to and from a server.
    1 Ascii.
    2 Binary (default).
  • WildCard Boolean
    Specifies a wildcard to filter directory listings with.

Microsoft announced that the InternetSetOption API call that is used within the OptionConnectTimeout, OptionReceiveTimeout and OptionSendTimeout properties does not work as they originally stated, therefore these properties should not be used. See MS Knowledge Base Article Q176420 for more information.

Methods

If an FTP operation fails, an error is raised detailing what happened.

  • AboutBox( )
    Displays copyright and version information for the control.
  • Version( ) String
    Returns the Control Version.
  • Connect( String Server, String UserID, String Password [, optional Integer PortNumber = 21, optional Boolean Passive = False ] )
    Connects to the specified server.
  • Reconnect ()
    Reconnects to the last connected server (without having to re-specify the connection details).
  • Disconnect()
    Disconnects from the server.
  • CD(String Directory)
    Changes the current directory on the FTP server.
  • Delete(String RemoteFile)
    Deletes the specified file on the FTP server.
  • GetFile(String RemoteFile [, optional String LocalDirectory, optional String LocalFileName])
    Gets a file from the server placing it in the current local directory specified by LCD or the LocalDirectory parameter if specified. The file name will be the same as the remote file if LocalFileName is not specified.
  • GetFileHTTP(String sRemoteURL [, optional String LocalDirectory, optional String LocalFileName])
    Retrieves a file from a URL via HTTP.
  • GetFileSize(String sRemoteURL) returns Long
    Returns the size of a file on the server.
  • GetServerTimeDifference() returns Long
    Works out the difference (in minutes) between the client and server by uploading and then deleting a small temporary file (TIMEDIFF.TXT).
  • List( [optional String sDirectory = "" ] ) returns Collection
    Returns a collection of dpFTPListItem objects - these have the following properties:
    String Name - File / directory name
    FileType - Whether each name is a file or directory
       -1 File
       0 Dir
    String TypeDescription - Windows Associated File Type description
    String DateTime - Last modified date / time
    Long Size - Size of file
  • ListToXML( Collection ListResults [, optional Boolean AddStylesheet = False ]) returns String
    Returns a string containing an XML representation of the directory listing collection passed in. If AddStylesheet is True then a reference is added to the standard DevPower FTP XSL Stylesheet supplied with the control which allows those with MSXML3 installed to view the output in HTML format.
  • LocalList( [optional String sDirectory = "" ] ) returns Collection
    Returns a collection of dpFTPListItem objects representing a listing of the specified local directory - or the current LCD.
  • FilterList( Collection DirCollection, dpFTPFileType ExtractType ) returns Collection
    Returns a filtered directory collection containing only files or directories.
  • SortList( Collection DirCollection [, Optional dpFTPListSort SortOptions=ftpDirFileAsc]) returns Collection
    Returns a sorted directory collection. The order is based upon the SortOptions parameter:
    ftpDirFileAsc (0) - directories ascending then files ascending.
    ftpDirFileDesc (1) - directories descending then files descending.
    ftpNameAsc (2) - names ascending.
    ftpNameDesc (3) - names descending.
  • MkDir(String Directory)
    Makes a directory on the FTP server.
  • PutFile(String LocalFile, [, optional String RemoteDirectory, optional String RemoteFileName])
    Transfers a file from the local PC onto the server. If RemoteDirectory isn't specified then the remote file will be created in the current directory. If RemoteFileName isn't specified then the remote file will have the same name as the local file.
  • Rename(String OrigFileName, String NewFileName)
    Renames a file on the server.
  • RmDir(String Directory)
    Removes the specified directory from the FTP server.
  • SendCommand (String Command)
    Sends a text command to the FTP server.
  • SetRegistration(String user, String SerialNo)
    Activates async (full) version from script or other environments that don't support property saving.

Events

  • ConnectionState ( Integer Connected )
    Raised when connection to the server is gained or lost.
    -2 Connection Dropped.
    -1 Connected.
    0 Not Connected.
  • LocalDirectoryChanged ( String Directory )
    Raised when local directory changes.
  • RemoteDirectoryChanged ( String Directory )
    Raised when remote directory changes.
  • ServerResponse ( String message )
    Raises server FTP response messages.
  • TransferStarting ( String RemoteFileName, String LocalFileName, Boolean Download, Long TotalBytes, Boolean Cancel )
    Raised when a transfer is started. Setting Cancel to True will stop the transfer.
  • TransferProgress ( String RemoteFileName, String LocalFileName, Boolean Download, Long Bytes, Long TotalBytes, Boolean Cancel )
    Raised to give progress of an asynchronous transfer. Setting Cancel to True will cancel the transfer.
  • TransferCancelling ( String RemoteFileName, String LocalFileName, Boolean Download )
    Raised when an asynchronous transfer is cancelling. The Windows API needs to continue reading the remote file.
  • TransferComplete ( String RemoteFileName, String LocalFileName, Boolean Download, dpFTPStatus Result )
    Raised when a transfer is completed.

INetUtils object

Version 2.0 includes an Internet Utilities object.

Properties

  • Connected Boolean
    Gets whether the computer is connected to the Internet.
  • ConnectionType dpFTPConnectionState
    Gets how the computer is connected to the Internet.
    ftpInternetConnectionUnknownNotConnected = 0
    ftpInternetConnectionModem = 1
    ftpInternetConnectionLan = 2
    ftpInternetConnectionProxy = 4
    ftpInternetConnectionModemBusy = 8
  • ConnectionMethod String
    Gets a description of how the computer is connected to the Internet.
  • LocalAddress String
    Gets the local IP address.
  • LocalHostName String
    Gets the local host name.

Methods

  • PingServer ( String HostName, ByRef String ReturnHostIP, ByRef Long ReturnPingTime ) returns Boolean
    Attempts to ping the specified server, returning True or False depending upon whether it succeeds. The host IP address and ping time (in MS) are also returned.