In order to access a secure FTP site, I need to specify a port (8080) for the proxy. There is no parameter for proxyport. I tried appending it with a colon (i.e., proxy.server.com:8080), but that didn't work. Via WinSCP, I can connect just fine since I can specify a proxy port in that app.
How do you specify a Proxyserver Port in CFFTP?
It's not documented, but try using the proxyPort parameter that is available in other tags.
Attribute validation error for the ftp tag.
|The tag does not have an attribute called proxyport. The valid attribute(s) are alloSize, bufferSize, actionParam, action, username, password, server, fingerPrint, passphrase, key, secure, timeout, port, connection, proxyserver, proxybypass, retrycount, stoponerror, passive, name, asciiextensionlist, transfermode, failifexists, directory, localfile, remotefile, item, existing, new, debug, result.|
It might be worth filing a feature request.
I agree with Eddie. It is unfortunate that the tag cfftp includes the attribute, proxyServer, yet omits proxyPort, proxyUsername, proxyPassword, and so on.
Nevertheless, you could still implement FTP with proxy in ColdFusion. You already have WinSCP, so do something like
<cfexecute name="C:\Program Files (x86)\WinSCP\WinSCP.exe" arguments="/script=C:\ColdFusion10\cfusion\wwwroot\workspace\FTPTest\FTP_get_script.txt"></cfexecute>
# Upon errors, automatically abort this script
option batch abort
# Disable overwrite confirmations (that conflict with previous)
# In other words, if file of same name already exists locally, replace it automatically, instead of reporting an error
option confirm off
# Connect using ftp://username:password@ftp_server_URL
# Use 'passive' flag, in case port not standard
open -passive ftp:user:password@hostname:port -rawsettings proxyHost=Proxy_host_name proxyPort=your_proxy_port_number proxyUsername=your_proxy_username proxyPassword=your_proxy_password
# Download all XML files to local directory C:\Users\BKBK\Desktop\ftp\
# Automatically resume transfer if possible
# Preserve file timestamp
# Delete files from remote (FTP) after download
get -resume -preservetime -delete *.xml C:\Users\BKBK\Desktop\ftp\
# Exit WinSCP