(experimental) XCALL FTP2 enhancement: now supports FTP/SFTP remote delete. Syntax is same as before, except for the new opcode XFTPF_DEL (&h00100000).
It may be combined with the opcode flags in the same way that the XFTPF_GET and XFTPF_PUT opcodes are. The banner message has not been updated to say "deleting" so you may want to disable it with XFTPF_NOBANNER.
The hostfile may contain the "*" wildcard character (matching zero or more characters, non-greedy). For example, e.g. "abc*.l*" or "*x*".
The localpath parameter is not used.
The status parameter will return the number of remote files deleted. 0 just means none. Errors will return < 0.
Notes:
• | The implementation is actually in ASHNET.DLL 1.7.148, and if you try to use the new XFTPF_DEL opcode with an older version of ASHNET.DLL, it will act like XFTPF_GET. To force an error instead, you can put something invalid in localpath, since it would only come into place when an older version mistook the XFTPF_DEL for XFTPF_GET. |
• | Directories will be skipped. |
• | The semantics should be the same between FTP and SFTP, although the underlying protocols and implementations on both the server and client are different, so there may be some differences in behavior. Some servers, and in particular some AMOS FTP servers, may not allow wildcards. |