Hello everybody,
I have a process in OpenEdge 10.1B that goes through all the files in a directory and keep their names in a temporary table. I'm trying to do the same with an FTP directory by adding the user information and password, but it doesn’t work and I do not know if it possible to do it. Any ideas?
Thanks in advance
DEFINE TEMP-TABLE ttimage FIELD ttimage INDEX ttimage IS UNIQUE PRIMARY ttimage.
DEFINE VARIABLE chDirectory AS CHARACTER NO-UNDO.
DEFINE VARIABLE chInputFrom AS CHARACTER NO-UNDO EXTENT 3.
EMPTY TEMP-TABLE ttimage.
FILE-INFO:FILE-NAME = 'ftp://usuario:password@ftpdirectory/'.
IF FILE-INFO:FILE-TYPE BEGINS 'D' THEN chDirectory = FILE-INFO:FILE-NAME.
IF chDirectory NE '' AND chDirectory NE ? THEN DO:
INPUT FROM OS-DIR(chDirectory).
REPEAT:
IMPORT chInputFrom.
IF chInputFrom[3] NE 'F':U THEN NEXT.
CREATE ttimage.
ASSIGN ttimage.ttimage = "http://ftpdirectory/" + chInputFrom[1].
END.
INPUT CLOSE.
END.
I doubt that the ABL client supports FTP access in that way... When on a GUI client, checkout an Active X component that supports FTP
I doubt that the ABL client supports FTP access in that way...
true, but it could make it for a nice feature isn't it? being able to access resources using URI like that could come in very handy
true, but it could make it for a nice feature isn't it? being able to access resources using URI like that could come in very handy
Any additional feature would be nice. But I'd bet a fortune, that Progress won't add it to 10.1B anymore.
Depending on the use case, Progress official response might also be to look at Sonic ESB and a file polling service...
Any additional feature would be nice. But I'd bet a fortune, that Progress won't add it to 10.1B anymore.
i'm not going to take that bet
Depending on the use case, Progress official response might also be to look at Sonic ESB and a file polling service...
and that will make it for a good laugh... adding full blown sonic esb in place just to be able to read from an ftp server does look like a realistic response coming from PSC
and that will make it for a good laugh...
I'm glad you are having fun on this sad day...
a sad day indeed but then again we can only do what the man said... make the most of the short time we've got till we leave room for the new to take place of the old.
A possible way would be to implement an FTP client using sockets in the ABL or perhaps, just the LIST command.
The RFC document (RFC 959 File Transfer Protocol) can be found at http://www.faqs.org/rfcs/rfc959.html. (TFTP is RFC 1350.)
There are some sample programs in DLC/src/samples/sockets that can give you an idea.
There are some tools that show the data being sent for TCP/IP commands. These tools can be used to help understand the protocol with an actual connection to an FTP site.
Perhaps, someone might have already implementing an FTP client.
I hope this helps.
Years ago I coded a "controller" which would interact with an FTP client on unix using "input-output through". I don't have the code now, but I know it can be done.