title: Read a directory listing into Powershell, then display every other filename to the screen
body: <p>Here is the Powershell script that I have created so far: </p>
  
  <pre><code>dir C:\Windows\System32 | Sort-Object -Descending 
  </code></pre>
  
  <p>My end goal is to list all the files (files only - no sub directories) in the following directory, sorted by filename in descending order. Next I need to read this directory listing created into Powershell, then display every other filename to the screen. </p>
  
  <p>I was trying to find a way to do this by piping the sorted results into the Foreach-Object cmdlet, and then reading "Object" from the resulting list, using the Get-Content cmdlet, and the FullName proprety of each object - like: Get-Content $_.FullName </p>
  
  <pre><code>dir C:\Windows\System32 | Sort-Object -Descending | ForEach-Object 
  </code></pre>
  
  <p>Any ideas how to make this happen with those cmdlets?</p>