Please enable JavaScript to view this site.

A-Shell Development History

xcall FTP2, host, user, password, localpath, hostfile, hostdir, opcode, status {,port {,emsg}}

Windows only. This is an independent implementation of the FTP (and SFTP) capability previously offered in FTPDLX.SBR. The FTP2 version does not use any COM components (thus no need to register any DLLs), nor any VB modules, nor does it need an ALIAS. It uses only the ashw32.exe executable and ashnet.dll 1.6(138) or higher. Aside from the reduced dependencies, the main advantage of this version is that it allows you to use a single connection for many file transfers, as opposed to FTPDLX, which opens and closes a connection for each individual transfer. This is of little benefit for one transfer, but makes a very significant difference when transferring many files.

The parameters are the same as for FTPDLX, with addition of a few new opcode options. All are listed here:

Symbol

Value

 

XFTPF_GET

&h00000000

Transfer from server to client PC.

XFTPF_PUT

&h00000001

Transfer from client PC to server.

XFTPF_ASCII

&h00000002

ASCII transfer mode. Note that some FTP servers will ignore the ASCII option as a security precaution.

XFTPF_NOERRMSG

&h00000010

Disable the error message dialog box display that will otherwise appear in the case of errors. In either case, the error code is also returned in the STATUS parameter.

XFTPF_PASSIVE

&h00000020

Passive transfer mode. This is often needed to get past firewall restrictions.

XFTPF_NOBANNER

&h00000040

Suppress the transfer banner.

XFTPF_DEBUG

&h00000080

Activates debug mode, which writes out a very detailed log file to C:\DEBUG.LOG. This is mainly of use when trying to solve low-level protocol problems. FTPDLX only.

XFTPF_SFTP

&h00000100

Use SFTP protocol instead of FTP. This requires a SSH2 service on the server side, typically at port 22.

XFTPF_RMVEXT

&h00000200

Rename host file after transfer, removing the last extension. This may be useful to prevent the file from being accessed by the remote system until the transfer is complete. Since it removes the last extension, you probably want to set the host file to have two extensions, such as MYFILE.DAT.UP. After the transfer is complete, the file would be renamed to MYFILE.DAT. FTPDLX only.

XFTPF_VERSION2

&h00010000

Request FTP2. FTPSYNC mode only.

XFTPF_KEEPOPEN

&h00020000

Keep connection open. FTP2 only.

XFTPF_REUSE

&h00040000

Reuse previous connection if available. FTP2 only.

XFTPF_CLOSE

&h00080000

Close connection, no transfer. FTP2 only.