title: Am not able to copy file names into into text directory from SFTP directory in unix (send "ls -lt *.csv > ${FEEDBACK_FILE_LIST}\r")
body: <p>I want to move all <code>.csv</code> files into <code>$FEEDBACK_FILE_LIST</code> with <code>send "ls -lt *.csv &gt; ${FEEDBACK_FILE_LIST}\r"</code>. It's not throwing any error but also not moving any of the files into local directory $FEEDBACK_FILE_LIST.</p>
  
  <p>Please help me.</p>
  
  <p><strong>EDIT</strong>:
  I want to get the list of files into local directory .PFB..</p>
  
  <pre><code>expect&lt;&lt;EOD 
  spawn /usr/bin/sftp -o Port=22 ${USER}@${HOST_NAME}
  expect "password:" 
  send "${PASSWD}\r" 
  expect "sftp&gt;" 
  send "ls -la *.csv &gt; ${FEEDBACK_FILE_LIST}\r" 
  expect "sftp&gt;"
  send "bye\r" 
  EOD
  </code></pre>