I'm supposed to be writing a program to pick up files left in an ftp server directory. I have ftp access to the directory, and I have a copy of the Indy pack components installed on my system. However, I'm running into a problem.
The files I'm supposed to be picking up don't have static names. That is, each file is in the format XX-YY-ZZ.csv, where XX and ZZ are constant, but YY is variable. I don't mean simply that it can change, I mean that it's determined on the other side by something I can't predict...in this case, the YY portion of the filename is the timestamp at which the file was created, as far as I can understand the spec sheet I'm working off of.
As I said, I can't predict the value of the timestamp portion of the filenames. As a result, I'm having trouble trying to figure out how to get the files downloaded. As far as I can tell, the Indy component TIdFTP's 'get' functionality won't allow wildcards, and I can't think of any other way to get the files I'm supposed to retrieve.
I have several questions regarding this:
1 .Does anyone know whether or not the TIdFTP component has functionality for the mget command? I know it's possible to give the mget a wildcarded target, but I haven't seen anything in the method list for the component that looks like mget. Am I just looking under the wrong name?
2. If the TIdFTP component can't handle an mget or a wildcarded get statement, could someone recommend another FTP component that can handle one of these options?
3. If there are no reasonable ways to get this done in Delphi, would someone please recommend another programming language it might be easier to do this in?
Thank you for your consideration.