| ChDir |
Description: Return current remote directory content
Syntax 1: dir„'obj' Œwi 'ChDir' © report current directory
Syntax 2: rc„'obj' Œwi 'ChDir'relativepath © changes current remote directory
relativepath: a relative path name (starting from current directory)
rc: return code is 1=success or 0=failure
Example:
'ftp' Å’wi 'ChDir' '/ftproot/ftp' |
| Connect |
Description: Connects to an FTP Server
Syntax: 'obj' Å’wi 'Connect'UserName Password HostName {Port}
UserName: a valid FTP user name
Password: the FTP user password
HostName: the domain name on the FTP Server
Port: the FTP port (defaults to 21)
Example:
'ftp' Å’wi 'Connect' 'username' 'password' 'www.lescasse.com'
or:
'ftp' Å’wi 'Connect' 'username' 'password' 'www.lescasse.com'21 |
| ConnectMe |
Description: This method runs the ]connectme User Command if available
Syntax: rc„'obj' Œwi 'ConnectMe'
rc: return code (1=connection succeeded, 0=connection failed)
Note: this method is used to connect you to your preferred FTP site
You must have defined a CMDCONNECTME function or User Command defined
according to the following model:
’ CMDCONNECTME A
[1] Œwi '*xUserName' 'username' © example: 'lescasse'
[2] Œwi '*xPassword' 'password' © example: 'mypassword'
[3] Å’wi '*xPort'21
[4] Œwi '*xHostname' 'domain_name' © example: 'www.lescasse.com'
’
Saving the CMDCONNECTME in your UCMD file allows you to show your
workspace code without exposing your FTP UserName and Password.
Do not forget the *'s in the above example.
*:R„1ª…0}" |
| Del |
Description: Delete one or more remote files
Syntax: rc„'obj' Œwi 'Del'relativefile
relativefile: a remote file with a relative path name (starting from current directory)
rc: number of files deleted or ¯1 if failure
Note: wildcards characters(* and ?) may be used to erase more than one file at a time
Examples:
'ftp' Å’wi 'ChDir' '/ftproot/ftp'
'ftp' Å’wi 'Del' 'temp/picutil.w3'
'ftp' Å’wi 'Del' 'temp/wback*.*' |
| Dir |
Description: Return current remote directory content
Syntax: dir„'obj' Œwi 'Dir' {pattern}
pattern: a relative path (may use pattern with * and ? wildcards)
If you omit <pattern> all files in directory are returned
dir: [;1] „… file name or directory\
[;2] „… file size in bytes
[;3] „… file date
[;4] „… file time
Example: Assuming my FTP account points to C:\INETPUB on my server:
'ftp' Å’wi 'Dir'
AdminScripts\ 0 0 0
catalog.wci\ 0 0 0
ftproot\ 0 0 0
iissamples\ 0 0 0
mailroot\ 0 0 0
scripts\ 0 0 0
wwwroot\ 0 0 0
'ftp' Å’wi 'Dir' 'wwwroot/lc/*.htm'
APL+Win Grid.htm 209019 20021122 0
APLWin40Syntax.htm 64090 20011207 0
LcLogo.htm 233 20020215 0
Note that directory information is returned as 0's. File times
may also be returned as 0's. Directories are reported with a
trailing \. |
| Disconnect |
Description: Close the current FTP connection
Syntax: 'obj' Å’wi 'Close'
Example:
'ftp' Å’wi 'Close' |
| Download |
Description: Downloads one or more files from a remote directory
Syntax 1: rc„'obj' Œwi 'Download'remotefile localfile
Syntax 2: rc„'obj' Œwi 'Download'remotepattern localdir
remotefile: a remote file name with a relative path
localfile: a complete local file name
remotepattern: a remote file path with * and/or ? wildcard characters
(if no * or ?, syntax 1 is assumed)
localdir: a local directory
rc: number of downloaded files if success or ¯1 if failure
Example:
'ftp' Å’wi '*Create' 'TFTP5'
'ftp' Å’wi 'ConnectMe'
1 © success
'ftp' Å’wi 'ChDir'
/ © at root directory at start
'ftp' Å’wi 'ChDir' '/ftproot/ftp/temp'
'ftp' Å’wi 'Download' 'picutil.w3' 'c:\temp\picutil.w3'
1 © 1 file downloaded
'ftp' Å’wi 'Download' '/ftproot/ftp/temp/*.*' 'c:\temp\download'
5 © 5 files downloaded |
| MkDir |
Description: Create a new remote directory
Syntax: 'obj' Å’wi 'MkDir'relativepath
relativepath: a relative path name (starting from current directory)
Example:
'ftp' Å’wi 'MkDir' '/ftproot/ftp/test' |
| New |
Description: Create a new instance of TFTP5
Example:
'obj' Å’wi '*Create' 'TFTP5'
|
| Ren |
Description: Renames a remote file
Syntax: 'obj' Å’wi 'Ren'oldfilename newfilename
oldfilename: a relative or absolute file name of the file to rename
newfilename: the new relative or absolute file name
Examples:
'ftp' Å’wi 'Chdir' '/ftproot/ftp'
'ftp' Å’wi 'Ren' '/ftproot/ftp/temp/picutil.w3' 'temp/picut.w3 |
| RmDir |
Description: Remove a remote directory
Syntax: 'obj' Å’wi 'RmDir'relativepath
relativepath: a relative path name (starting from current directory)
Examples:
'ftp' Å’wi 'ChDir' '/ftproot/ftp/mai'
'ftp' Å’wi 'ChDir'
ftproot/ftp/mai
'ftp' Å’wi 'MkDir' 'temp'
'ftp' Å’wi 'RmDir' 'temp'
'ftp' Å’wi 'MkDir' 'temp'
'ftp' Å’wi 'RmDir' '/ftproot/ftp/temp' |
| Upload |
Description: Sends one or more files to a remote directory
Syntax 1: rc„'obj' Œwi 'UpLoad'localfile remotefile © for a single file upload
Syntax 2: rc„'obj' Œwi 'UpLoad'localpattern remotedir © for multiple files upload
localfile: a complete local file name
remotefile: a remote file name with a relative path
localpattern: a local file path with * and/or ? wildcard characters
(if no * or ?, syntax 1 is assumed)
remotedir: a relative remote directory
rc: number of uploaded files if success, or 0 or ¯1 if failure
Example:
'ftp' Å’wi '*Create' 'TFTP5'
'ftp' Å’wi 'ConnectMe'
1 © success
'ftp' Å’wi 'ChDir'
/ © at root directory at start
'ftp' Å’wi 'UpLoad' 'c:\temp\picutil.w3' '/ftproot/ftp/temp/picutil.w3'
'ftp' Å’wi 'Upload' 'c:\temp\zipocx\*.*' '/ftproot/ftp/temp'
5 © 5 files were uploaded
'ftp' Å’wi 'Upload' 'c:\temp\zipocx\*.*' '/ftproot/ftp/tmp'
¯1 © failed to upload files because directory c:\inetpub\ftproot\ftp\tmp does not exist |
| XmlDir |
Description: Return XML representation of current remote directory content
Syntax: xmldir„'obj' Œwi 'XmlDir'
Example:
'ftp' Å’wi 'XmlDir' |
| XmlLog |
Description: Return XML Log
Syntax: xmllog„'obj' Œwi 'XmlLog'
xmllog: an xml text representing all TFTP5 activity (including errors)
Example:
'ftp' Å’wi 'XmlLog' |