title: ftp command mget - get file without extension but avoid conflicting file with extension
body: <p><strong><em>Note:</strong> This is not a duplicate of <a href="https://stackoverflow.com/questions/2597394/mget-on-file-without-extension">2597394</a>.</em></p>
  
  <p>I have an FTP server (Unix or Linux) with a folder that contains the following files <em>(for example)</em>:</p>
  
  <ul>
  <li><strong>filename.txt</strong></li>
  <li><strong>filename.txt.abc</strong></li>
  <li><strong>filename</strong></li>
  </ul>
  
  <p>When I issue <code>mget file*</code> command to <code>ftp</code> or <code>sftp</code>, I can fetch all three files. What I need to do is to fetch only the <strong>filename</strong> file (the one without any extension).</p>
  
  <p>I tried <code>grep</code> and <code>|</code> but these aren't recognized by the <code>ftp</code> or <code>sftp</code> commands' prompt. I also tried <code>--exclude</code> but the mget here doesn't even support any options. The man page is something like <a href="http://ss64.com/nt/ftp.html" rel="nofollow noreferrer">this</a>.</p>
  
  <p>How do I solve this problem? I cannot specify the exact filename as it's not known. It must be a wild card.</p>