Using the ftp list command

This is how to perform an ftp list command using net.ftp.list from the net module.

This example uses the publicly available NASA ITCD ftp server.

Here is the code for you to copy:

function main() 
   local id=net.ftp.init{
      server='ftp.hq.nasa.gov', 
      username='anonymous', password='<your email address>'}
   id:list{remote_path='/'}
   id:list{remote_path='/pub'}
end

Leave A Comment?