title: using powershell, How do I get the first (ascending or descending) file in the list?
body: <p>as above. Thanks you.</p>
  <hr />
  <p>maybe best explained with an example.</p>
  <p>I have the following files:</p>
  <pre><code>my-app-version-0.01.zip
  my-app-version-0.04.zip
  my-app-version-0.08.zip
  my-app-version-0.10.zip
  </code></pre>
  <ul>
  <li>If I want to get the first file (ascending), I would get my-app-version-0.01.zip.</li>
  <li>If I want to get the first file (descending), I would get my-app-version-0.10.zip.</li>
  </ul>
  <p>In linux/macOS, this is what I used:</p>
  <pre><code>ls -r my-app-version*.zip | head -1
  </code></pre>
  <p>NOTE:</p>
  <ul>
  <li>-r is for reverse (descending sorting)</li>
  <li>head -1 returns the topmost result</li>
  </ul>