We _have_ implemented parsing of a dir listing from an FTP command . . .
the partner we're FTPing _from_ uses numeric digits in the filename (e.g.
edifile.091234.123abc) and we cannot accept them on our IBM mainframe (390)
- we had to write a routine in COBOL to read the FTP log file that has the
original filenames in it and output multiple GET statements, renaming the
files in the process, to yet _another_ file that can be sandwiched into a
logon/logoff script, then use the _new_ script to actually retreive the
files.

Harold DeWayne, CECP
Gates McDonald Health Plus




Quoted text is from <383546839.989331464307.JavaMail.root@web313-wrb>,
by Ron Katz[[EMAIL PROTECTED]] <[EMAIL PROTECTED]>

>How would you do that programatically?

It rather depends on which language you are using :-)

If I request "DIR dmxtrans.gif" then a line is returned to me (or stored
in file if I so request it) which seems very similar to the UNIX ls -l
format.

-rw-r--r--   1 webuser  web          323 Apr 29  1998 dmxtrans.gif

The above may have been word-wrapped by your mailer. Empirically I would
extract columns 33 to 40 of the line and convert them to an integer (in
this case 323) to get the file size.

In our FTP interfaces we pull down the files first, and then check the
sizes locally if needed, but one of the joys of using FTP is that most
trading partners have subtle differences in their requirements for
naming, re-naming, deletion, semaphoring, etc. so that the EDI FTP
interface needs to be partner-specific script driven, and the script
language has constantly to be 'enhanced'. We haven't implemented parsing
of a DIR listing yet, but it is always possible that we would need to do
it tomorrow.

Regards
Chris

--
Chris Johnson  +44 (0)20 8501 1490 (home)
EDIMatrix Ltd  +44 (0)20 8559 2454 (work)
               +44 (0)20 8559 2497 (fax)
http://www.edimatrix.co.uk

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

Reply via email to