General discussion

  • Creator
    Topic
  • #2327744

    FTP via dos .bat script ……ASAP

    Locked

    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?

All Comments

  • Author
    Replies
    • #3500973

      FTP via dos .bat script ……ASAP

      by trwolford ·

      In reply to FTP via dos .bat script ……ASAP

      Point value changed by question poster.

    • #3501257

      FTP via dos .bat script ……ASAP

      by todd kimbrell ·

      In reply to FTP via dos .bat script ……ASAP

      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

Viewing 1 reply thread