2008 Jan 02 4:33 PM
hallo everybody,
I need to read a directory on an ftp server to know which files are stored...
Could you help me?
Thank you very much!
2008 Jan 02 4:37 PM
hallo everybody,
I need to read a directory on an ftp server to know which files are stored...
Could you help me?
Thank you very much!
2008 Jan 02 4:37 PM
2008 Jan 02 4:43 PM
thanks for your answer, but is there a function that gives an internal table with file list?
2008 Jan 02 4:50 PM
If you take a look at the program mentioned above, you will see this coding.
if cmd1 ne ' '.
call function 'FTP_COMMAND'
exporting
handle = hdl
command = cmd1
compress = compress
tables
data = result
exceptions
command_error = 1
tcpip_error = 2.
loop at result.
write at / result-line.
endloop.
refresh result.
endif.
The RESULT internal table will have the list of documents, all you need to do is enter the correct command on the selection screen.
So for example, if your ftp destination url looks like this......
ftp://100.200.123.456/documents/
then enter the following on the selection screen of the test program.
Host 100.200.123.456
Command 1 dir documents
Run this program and you will see the list of files under this directory.
Regards,
Rich Heilman
Edited by: Rich Heilman on Jan 2, 2008 11:56 AM
2008 Jan 02 5:01 PM
Thank you very much.
I had seen how the function works, anyway the table has no structure, no it is not very east to get the name of the files stored in the table itsself.
2008 Jan 02 5:22 PM
2008 Jan 03 10:40 AM
2008 Jan 02 4:39 PM
2008 Jan 02 4:44 PM
Thanks,
bu FM RZL_READ_DIR_LOCAL seems to be useful just for local directory, while I need to read an ftp directory.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |