Is there any way to determine ErrorLevel when executing an FTP script

Posted on 2006-05-25
Last Modified: 2012-06-27
Thanks in advance
Question by:AlexF777
    LVL 16

    Accepted Solution

    Hi AlexF777,

    I'm not sure you can get an errorlevel from FTP itself but I use a different method. It relies on the fact that FIND will return an errorlevel if the searched string is not found. Pipe the output of your FTP script to a file and run a FIND against it, looking for error strings.

    LVL 10

    Expert Comment

    I think Paul has a good idea.  You just need to know what you are looking for in the output.  Either search for success messages or error messages with FIND or FINDSTR.  If you are more specific we can help with a script to help you get started.

    Depending on what you are doing with FTP, you can also use a different executable that will return an errorlevel (like NCFTPPUT or NCFTPGET or WGET ... which would have to be downloaded or installed on your PC).
    LVL 63

    Expert Comment

    I would use a command line FTP program that returns Errorlevel info and an error file.
    A free one that works for me is

    WCL_FTP - Search in google, small fast and has good error handling and logging.

    I hope this helps !

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
    Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now