title: Printing with Powershell and files in folders
body: <p>I have a script which does some onsite printing. It doesnt work too well at the moment as the below runs for various file types which are sent to a folder to print, but the problem is it will only print 1 document at a time.      </p>
  
  <pre><code>Start-Process –FilePath “c:\tests\*.docx” –Verb Print
  </code></pre>
  
  <p>I had the idea of doing this to get around it:</p>
  
  <pre><code>    get-ChildItem "C:\Tests\*.docx" | `
  
      foreach-object {
  
      start-process -verb Print
  
  }
  </code></pre>
  
  <p>This doesnt seem to work though. So then i tried this:</p>
  
  <pre><code>get-childitem "C:\Tests\*.xlsx" | `
  
  foreach-object {
  
  Start-Process -Filepath "C:\Program Files\Microsoft Office\Office14\EXCEL.exe" –Verb Print }
  </code></pre>
  
  <p>Also no luck, </p>
  
  <p>Returns this error:</p>
  
  <pre><code>Start-Process : This command cannot be run due to the error: No application is associated with the specified file for this operation.
  </code></pre>
  
  <p>I think i am maybe not visualing the process here. Any ideas at all anyone on how to achieve printing of every file in a folder via powershell?</p>
  
  <p>Windows 7 64 bit and $PSVersion = 5.0</p>
  
  <p>Thanks in advance </p>