[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPUT Suggestion



Thanks Scott...I've implemented the opendir/readdir/closedir technique
and it works like a champ. Thanks for writing such good code. :)

- Michael

On 1/25/07, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
>
> > What's the best way to perform an MPUT of files in an IFS directory
> > using FTPAPI? I can think of a couple ways: I could use QSH to do an
> > ls into a PF, then read the PF and use ftp_put for each file. Or, I
> > could use opendir, readdir, closedir to get a list, and then transfer
> > each entry in the list. Or, is there an ftp_mput that I'm missing?
>
> I'd suggest using opendir/readdir/closedir.  FTPAPI does include the
> prototypes for those APIs (in the IFSIO_H member) if you don't have them
> elsewhere.
>
> Unfortunately, IBM hasn't made APIs for file globbing, which makes it
> somewhat awkward if you need to use wildcards.  (On the other hand, the
> server handles the globbing on an MGET request, so MGET is much easier.)
> If you do need to use globbing, the "ls" command in QShell might be easier
> than the APIs.   But, I do recommend using the spawn() API in that case,
> rather than writing the output of LS to a file. I just think it's more
> elegant than using a temporary file.  Of course, that's only an opinion.
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------