Friday, December 2, 2011

Print All PDF Files in Folders using PowerShell

 

PowerTip of the Day, from PowerShell.com:

Try this one-liner if you need to print out all PDF documents you have stored in one folder:

Dir c:\myfolder\*.pdf | Foreach-Object { Start-Process -FilePath $_.FullName – Verb Print }

 


Thanks to www.powershell.com

2 comments:

  1. This only prints one of the PDF files for me, if I change to a mapped drive on my machine:
    1. cd G: (to get the G drive)
    2. Dir "G:\folder\folder2\folder3\folder4\folder5\*.pdf" | Foreach-Object { Start-Process -FilePath $_.FullName –Verb Print }

    ReplyDelete
  2. Hi Chris, for me its working on normal folder..

    ReplyDelete