![]() ![]() ![]() |
Variables returned for CFFTP operations are as follows:
Sections that follow describe each of these variable types.
The value of the CFFTPResult.ReturnValue variable is determined by the result of the ACTION attribute used in CFFTP.
CFFTPResult.ReturnValue Variable | |
---|---|
CFFTP ACTION |
Value of CFFTPResult.ReturnValue |
GetCurrentDir |
String value of the current directory |
GetCurrentURL |
String value of the current URL |
ExistsDir |
Yes or No |
ExistsFile |
Yes or No |
Exists |
Yes or No |
The following variables are created when the STOPONERROR attribute is No:
The following table lists the error codes that can be returned in the CFFTP.ErrorCode variable:
CFFTP.ErrorCode Values | |
---|---|
Error Code |
Description |
0 |
Operation succeeded |
1 |
System error (OS or FTP protocol error) |
2 |
An Internet session could not be established |
3 |
FTP session could not be opened |
4 |
File transfer mode not recognized |
5 |
Search connection could not be established |
6 |
Invoked operation valid only during a search |
7 |
Invalid timeout value |
8 |
Invalid port number |
9 |
Not enough memory to allocate system resources |
10 |
Cannot read contents of local file |
11 |
Cannot write to local file |
12 |
Cannot open remote file for reading |
13 |
Cannot read remote file |
14 |
Cannot open local file for writing |
15 |
Cannot write to remote file |
16 |
Unknown error |
17 |
reserved |
18 |
File already exists |
19 |
reserved |
20 |
reserved |
21 |
Invalid retry count specified |
When you use CFFTP with the ListDir action, you must also specify a value for the NAME attribute. The value of the NAME attribute is used to hold the results of the ListDir action in a query object. The query object consists of columns you can reference in the form:
queryname.columname[row]
Where queryname is the name of the query as specified in the NAME attribute and columnname is one of the columns returned in the query object as shown in the following table. Row is the row number for each file/directory entry returned by the ListDir operation. A separate row is created for each entry.
CFFTP Query Object Columns | |
---|---|
Column |
Description |
Name |
Filename of the current element |
Path |
File path (without drive designation) of the current element |
URL |
Complete URL for the current element (file or directory) |
Length |
Number indicating file size of the current element |
LastModified |
Unformatted date/time value of the current element |
Attributes |
String indicating attributes of the current element |
IsDirectory |
Boolean value indicating whether object is a file or directory |
The example at the beginning of this chapter includes a LISTDIR action and the output of the query.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.