We have a legacy system that is using the built in Windows commandline ftp client to upload files to an ftp server. It does this using the -s switch, with an ftp file something like the following:
debug open myftpsite.com 21 <username> <password> cd remote_folder ascii lcd "c:\myfolder" prompt put export.txt export.tx rename export.tx export.txt quit
This works 99% of the time, but the other 1% of the time it doesn't. When it runs successfully the resulting logfile contains response messages from the server like "250 OK" after each of the commands above. The problem is sometimes it seems to fail to connect then we get NO messages in the logfile (from the server or ftp client) at all. The ftp client also still seems to return a process exit code of 0.
Does anybody have any suggestions for:
Getting better logging back from the built in Windows commandline ftp client? AND\OR Forcing it to return a Process Exit Code other than 0 to indicate something has gone wrong?