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

ftp_get local file question



Sender: "Richard B Baird" <rbaird@xxxxxxxxxxxxxxxxxxxxx>


Scott,

I've got a situation where I'm doing a get to a banks ftp server, and I
don't know what the file name is.  here's the situation:

the directions given by the bank says to enter the command
'get file.name(+0)'
and it will give you the latest incarnation of the file you wish - for
instance, file.name.g0023v01    - they must use some sort of pre-processing
program with the get command to achieve this result.

so, i don't know what the file name will be, until after i retrieve it.
looking at ftp_get code, as i understand it, if I don't specify a local
file name, ftp_get will assume the remote file name, in this case
'file.name(+0)'
- an invalid file name.

if I do specify a local file name, I would have to rename it due to having
and needing multiple versions of the file already on my server, but at this
point, I don't know the file name I actually retrieved, but I do want to
retain the bank's file name.

you see my dilema?  If I use the ibm ftp client, everything is peachy, and
i get the file name as it was intended (because I didn't supply a local
file name)

I would like for the remote server to name the file for me.  do you have
any ideas on how to handle this situation using ftp_get? or maybe, is this
a job for ftp_getraw?

thanks,

rick

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------