BackUp LevelNext

File and Directory Operations

Once a connection has been established you can perform file and directory operations to and from the connected FTP server. Use the following CFFTP attributes to do file and directory operations once a CFFTP connection has been established.

CFFTP File and Directory Operation Attributes 
Attribute
Description
ACTION
Required if connection is not already cached. If connection caching is used, the ACTION attribute is not required. Determines the FTP operation to perform. Can be one of the following:
  • ChangeDir
  • CreateDir
  • ListDir
  • GetFile
  • PutFile
  • Rename
  • Remove
  • GetCurrentDir
  • GetCurrentURL
  • ExistsDir
  • ExistsFile
  • Exists

Note: Names of objects (files and directories) are case-sensitive. Thus a ListDir on test.log will not find test.LOG.

USERNAME
Required if the FTP connection is not already cached. If connection caching is used, the USERNAME attribute is not required. User name to pass in the FTP operation.
PASSWORD
Required if the FTP connection is not already cached. If connection caching is used, the PASSWORD attribute is not required. Password to log the user.
NAME
Required for ACTION="ListDir". Specifies the query name to hold the directory listing.
SERVER
Required if the FTP connection is not already cached. If connection caching is used, the SERVER attribute is not required. The FTP server to connect to.
TIMEOUT
Optional. Value in seconds for the timeout of all operations, including individual data request operations. Defaults to 30 seconds.
PORT
Optional. The remote port to connect to. Defaults to 21 for FTP.
CONNECTION
Optional. The name of the FTP connection. Used to cache the current FTP connection or to reuse connection information from a previous connection of the same name. All calls to CFFTP with the same connection name will reuse the same FTP connection information.
ASCIIEXTENSIONLIST
Optional. A semicolon delimited list of file extensions that force ASCII transfer mode when TRANSFERMODE="Autodetect". Default extension list is:
txt;htm;html;cfm;cfml;shtm;shtml;css;asp;asa
TRANSFERMODE
Optional. The FTP transfer mode you want to use. Valid entries are ASCII, Binary, or Autodetect. Defaults to Autodetect.
AGENTNAME
Optional. Application or entity conducting transfer.
FAILIFEXISTS
Optional. Yes or No. Defaults to Yes. Specifies whether a GetFile operation will fail if a local file of the same name already exists.
DIRECTORY
Required for ACTION=ChangeDir, CreateDir, ListDir, and ExistsDir. Specifies the directory on which to perform an operation.
LOCALFILE
Required for ACTION=GetFile, and PutFile. Specifies the name of the file on the local file system.
REMOTEFILE
Required for ACTION=GetFile, PutFile, and ExistsFile. Specifies the name of the file on the FTP server's file system.
ATTRIBUTES
Optional. Defaults to "Normal." A comma delimited list of file attributes. Specifies the file attributes for the local file in a GetFile. Can be any combination of the following:
  • ReadOnly
  • Hidden
  • System
  • Archive
  • Directory
  • Compressed
  • Temporary
  • Normal

File attributes differ according to environment.

ITEM
Required for ACTION=Exists, and Remove. Specifies the object, file or directory, of these actions.
EXISTING
Required for ACTION=Rename. Specifies the current name of the file or directory on the remote server.
NEW
Required for ACTION=Rename. Specifies the new name of the file or directory on the remote server.
RETRYCOUNT
Optional. Number of retries until failure is reported. Default is one (1).
STOPONERROR
Optional. Yes or No. When Yes, halts all processing and displays an appropriate error. Default is No.
When No, three variables are populated:
  • CFFTP.Succeeded -- Yes or No.
  • CFFTP.ErrorCode -- Error number (See STOPONERROR variables, below.)
  • CFFTP.ErrorText -- Message text explaining error condition.


BackUp LevelNext

allaire

AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.