[FTP] Getting the latest file

Try this

files = ftp.list('*x86.exe') # <-- what does this return?

   files = ftp.nlst('*x86.exe')
   files.each do |f|
       p ftp.mdtm(f)
   end
  
Guy Decoux

“ts” decoux@moulon.inra.fr wrote in message
news:200212091615.gB9GFNA19484@moulon.inra.fr

Try this

files = ftp.list(‘*x86.exe’) # ← what does this return?

files = ftp.nlst(‘*x86.exe’)
files.each do |f|
p ftp.mdtm(f)
end

Thanks Guy,

Can you tell me whta the “mdtm” means? I am not familiar with that.

Bob X wrote:

“ts” decoux@moulon.inra.fr wrote in message
news:200212091615.gB9GFNA19484@moulon.inra.fr

“B” == Bob bobx@linuxmail.org writes:

Try this

files = ftp.list(‘*x86.exe’) # ← what does this return?

files = ftp.nlst(‘*x86.exe’)
files.each do |f|
p ftp.mdtm(f)
end

Thanks Guy,

Can you tell me whta the “mdtm” means? I am not familiar with that.

From context, I’m guessing “modification time”.

Can you tell me whta the "mdtm" means? I am not familiar with that.

pigeon% man ftpd
[...]
           LIST give list files in a directory (``ls -lgA'')
           MKD make a directory
           MDTM show last modification time of file
           MODE specify data transfer mode
           NLST give name list of files in directory
[...]
pigeon%

Guy Decoux