Topic: net/ftp get first file using wildcard
I'm trying to 'get' the first file that has a certain extention (msg) from a ftp location to my hard drive. So what I have is:
ftp = Net::FTP.new('ip.addrees')
So far everything is fine. I'm in the right folder. Using 'get' I can get the file to my harddrive but I don't actually want type the filename I want my little rubyscript to go to the first file meeting the *.msg criterium and then 'gets' it. I tried ftp.get('*.msg').first in all kinds of variations but that doesn't work. Anybody any ideas?