title: FTP get and delete multiple files
body: <p>I have to get and delete multiple files via FTP so I wrote this script:</p>
  
  <p><code>open ftp.myftpserver.org
  user
  pass
  cd folder
  lcd E:\localdir
  mget *
  mdel *
  bye</code></p>
  
  <p>This works but is not safe since the <code>folder</code> is being fed from other sources and the <code>mdel *</code> step may delete files uploaded in the meanwhile. </p>
  
  <p>I guess a solution could be moving the files remotely to a different folder, building a filelist at the beginning of the process, but i have no idea how to make it.</p>
  
  <p>Is it possibile?</p>