P
Peter Bailey
Hi,
I'd like to go to an ftp site and check the dates of available files
there. (I only want today files.) I see that ftp, from 'net/ftp' has an
mtime method. But, I can't seem to get it to work. Here's what I've
tried.
...
xmlfiles = ftp.list('*.xml')
xmlfiles.each do |xmlfile|
puts xmlfile
puts ftp.mtime(xmlfile)
end
...
I get something like this:
Exception: 500 'MDTM -rw-rw-r-- 1 bna staff 43945 Oct 19
08:50 lobbyreg-20071010-160009.xml': command not understood.
Just doing the "puts xmlfile" works fine, just not the mtime thing.
Thanks,
Peter
I'd like to go to an ftp site and check the dates of available files
there. (I only want today files.) I see that ftp, from 'net/ftp' has an
mtime method. But, I can't seem to get it to work. Here's what I've
tried.
...
xmlfiles = ftp.list('*.xml')
xmlfiles.each do |xmlfile|
puts xmlfile
puts ftp.mtime(xmlfile)
end
...
I get something like this:
Exception: 500 'MDTM -rw-rw-r-- 1 bna staff 43945 Oct 19
08:50 lobbyreg-20071010-160009.xml': command not understood.
Just doing the "puts xmlfile" works fine, just not the mtime thing.
Thanks,
Peter