1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

any programmers

EnzoS4 Nov 5, 2008

  1. EnzoS4

    EnzoS4 Member

    200
    0
    16
    wasn't sure where to list this under...

    do we have any programmer on here that can do batch scripts.. I've got to create a automated script to do ftp and confirm it worked, I also need to report different failures.

    no errorlevel are returned from ftp batch srcipts, so far I've output the ftp to a file and done a batch script to look into the file for errors but this dosen't work

    any ideas or suggestions.
     
  2. benw123

    benw123 Moderator

    1,863
    3
    38
    I've worked on something similar before with FTP, but not with batch files. I developed an application instead (in .NET) because it's easier to report successful downloads/uploads and has much better error handling - you might find this approach is best. The application can easily be scheduled or converted into a Windows Service if it has to run often.
     
  3. EnzoS4

    EnzoS4 Member

    200
    0
    16
    thanks for the reply, all sorted using batch.. old I know but don't have the time to learn different scripting

    thanks anyway

    just in case anyone interested:

    set finderr="not connected"
    for /f "tokens=*" %%A in ('find "%finderr%" log.txt') do set chk=%%A
    echo %chk%|find /i "%finderr%">nul
    if %errorlevel%==1 echo: CONNECTED
    if %errorlevel%==0 echo: NO CONNECTED
     

Share This Page