Print All PDF Files in a Folder

Share |

Join PowerShell.com!
Subscribe to Feed

PowerShell eBook
Sign up for
Your PowerTip of the Day:

Award-winning PowerShellPlus


Admin Guide to PowerShell Remoting


Mastering PowerShell eBook

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 }

Twitter This Tip! ReTweet this Tip!


Posted Mar 01 2011, 08:00 AM by ps1

Comments

Olivier Demont wrote re: Print All PDF Files in a Folder
on 04-06-2011 3:14 AM

Hello !

Juste a correction ...

You must delete a space between "-" and "Verb" ...

Correct :

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

All best

Olivier Demont

[url=www.mcpvirtualbusinesscard.com/.../interactivecard]Virtual Business Card[/url]

[url=ch.linkedin.com/.../olivierdemont]Profile Linkedin[/url]

Bryan Price wrote re: Print All PDF Files in a Folder
on 11-29-2011 12:48 PM

Also, it's -Path, not -FilePath.

Copyright 2012 PowerShell.com. All rights reserved.