HP3000-L Archives

February 2011, Week 2

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, MMfab" <[log in to unmask]>
Reply To:
Dave Powell, MMfab
Date:
Wed, 9 Feb 2011 16:46:21 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
The approach you try below might work, but any error will give lots of MPE 
unknown-command errors.

A common workaround is using the echo or print command to build a temp file, 
then run ftp with that file as input.  With proper error checking it should 
work.

I have things working similar to the following

!ECHO exitonerror >>  FTPI
!ECHO {logon into} >>  FTPI
!ECHO put file1.pub  file1.txt  >>  FTPI
!ECHO quit >>  FTPI
!run ftp.arpa.sys  <  FTPI

Then later I do error checking a bit like
!IF FTPLASTERR = 0 &
!AND FTPXFERFILES = FTPREQFILES &
!AND FTPXFERFILES = your-own-file-count
!      all ok;  purge the files
etc.

Then a clever/brave person might tack on a routine to say that even if it 
failed, if FTPXFERFILES > 0, purge that many of your files.  If you 
transferrred 3, purge the 1st 3, etc.
I haven't done that bit myself.  Here, any failure means retry from the 
start.  And the only common failures are at ftp login time, where that's 
what we want anyway.

----- Original Message ----- 
From: "Paul D. Christensen" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, February 09, 2011 15:26
Subject: [HP3000-L] FTP Question - follow up


> perhaps I should have asked more than just why the ";move" does not work.
>
> what I am trying to do is to move several files from a directory on the 
> hp3000 to another server and to purge the files after they have been 
> moved, so the next time my process runs
> it will not send those same files.  However I do want to ensure that the 
> FTP actually did send the file - that's why I wanted to do the ";move" 
> parameter.
> But if that does not work - what is the best way to only purge the file, 
> only if the FTP actually worked.
> I was seeing in the documentation there is an exitonerror command - I have 
> never tried using this - is that something that is issued once and then is 
> good for the duration of the ftp process?
>
> here's what I am thinking of doing - if I can't get the "move" to do a 
> delete
>
> exitonerror
> put FB021111 FB021111.txt
> :purge FB021111
> put FB021211 FB021211.txt
> :purge FB021112
> etc. etc. as many times as I have files in my group
>
> --
> Paul D. Christensen
>
> Osakis MN 56360-0369
>
> * 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