>
> 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.
Awk works for this sort of thing. I don't have access to a Unix machine
this instant in order to test it, but it would be something like this:
bytecount=`ls -l dmxtrans.gif | awk '{print $5}'`
(The thing after the filename is a "pipe" symbol.) This, or something very
nearly like it, would place the fifth space-delimited token from the "ls -l"
output into the variable "bytecount".
>
> 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/