I use the following code to try to get all ftp files using Ruby.
files = ftp.list() files.each do |file| ftp.gettextfile(file) end
The problem is that ftp.list returns a whole line of information, not just the file name, for example.
-rw-r--r-- 1 ftp ftp 0 May 31 11:18 brett.txt
How to extract filen from this line?
Many thanks
Bretski
source share