General discussion

Locked

FTP via dos .bat script ......ASAP

By trwolford ·
I coded a DOS batch script for FTP transfers which is simple. This is what I need:

a way to look for the 226 return code when the file transfer was successful. I have not been able to accomplish this in a .bat script. Is this even possible?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

FTP via dos .bat script ......ASAP

by trwolford In reply to FTP via dos .bat script . ...

Point value changed by question poster.

Collapse -

FTP via dos .bat script ......ASAP

by Todd Kimbrell In reply to FTP via dos .bat script . ...

That is a clever request!

However, keep in mind that running local batch files will only provide placement of user input, not arguments. 220,226 etc codes are server side and are "unseen" by local run batch files.

FTP supports internal scripting. You use the "-s:" option to specify a script and then place your arguments within that file, an example: script.txt. But in all my experience I have never been able to "trap" return or error codes. But making changes, like changing file names on the fly and automating downloads and uploads to specific directories or servers works well...... The best way I have been able to make certain that the scripts worked properly is to output a log file after the batch or script has run.

Best Regards!!

Todd Kimbrell

Back to Desktop Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums