HP3000-L Archives

March 2004, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dave Powell <[log in to unmask]>
Reply To:
Dave Powell <[log in to unmask]>
Date:
Wed, 24 Mar 2004 14:12:17 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
If you don't mind making the whole thing WAAAY to long, try something like

ftp> someftpcommand
ftp> :if ftplasterr <> n or ftplastmsg = "x" or ftplastreply = 'y'
ftp> :     showvar ftp@
ftp> :    quit abort die-right now
ftp> :endif
ftp> nextftpcommand
ftp> :if ........

Lastmsg & lastreply might not always be set, so you might need to initialize
them first.  And you might need to start with just ':showvar ftp@' between
every line just to see what the 'good' values are at each step.

Dave ('or get the current patch')  Powell

----- Original Message -----
From: "Tim Cummings" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, March 24, 2004 12:39
Subject: Re: [HP3000-L] FTP does not exit on error


> Kent,
> <snip> As I recall you need to FTPLASTERR variables after you exit. <snip>
>
>
> The problem is that FTP continues to process commands after an error and
> before exiting.
>
> So if you had a script that looked like:
>
> FTP> EXITONERROR
> FTP> GET filename
>   failure occurs here
> FTP> DELETE filename
> FTP> EXIT
> : IF FTPLASTERR ...
>
> Too late you lost your file.
>
> Not acceptable!
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2