To create a batch script, which automatically makes an ftp transmissions is easy to do; but what if the host has no direct ftp access to the Internet and must use a proxy server?
Actually, it is not that different but the ftp syntax changes a lot. Once one knows how to do it is is soo easy.
Let's take a look at the batch file which will be executed on a daily manner (by the Windows Task Scheduler):
echo "Automatic File Transfer"
Well this wasn't really different from a normal ftp batch file, the difference is the ftp syntax in the file which holds the ftp commands (ftplist.txt):
The big difference is the handling of the connection. Instead of connecting directly to the remote host (FTPHOST), the connection has to be established to the PROXYSERVER (Squid, Bluecoat, etc.).
Then the user authentication seems a bit strange to fellow ftp-users, but that's the way it works: The FTPUSER with the remote FTPHOST (similar to ftp by browser) followed by the user you will authenticate against your PROXYSERVER (your PROXYUSER).
The next two lines indicate the passwords: First the one for the ftp connection, the second one is the password for your proxy user.
After that you can launch your known ftp commands, put, get, dir, etc.