title: How to save Filename and Modified Date to .txt filein PowerShell v3.0
body: <p>I am trying to convert my batch file syntax to PowerShell v3.0. I need to pull all the file names from a mapped network drive and save it to a folder on my root C:</p>
  
  <p>Everything works except when it comes to saving the file names. If I do</p>
  
  <pre><code>dir /s &gt; C:\2\filename.txt
  </code></pre>
  
  <p>In a batch file it will output the file's name (along with the extension) and the date modified to a .txt file. However I cannot get the PowerShell v3.0 equvalent to work. It just creates a txt file but nothing is saved within the file. Here is my PowerShell v3.0 code.</p>
  
  <pre><code>Get-ChildItem -Path K:\Transactions\Processed\Audit-Images\Lane` 12\$date\done &gt; C:\2\$date-LaneServer12ImagesDONE.txt
  </code></pre>