# Print all files in folder in one time

**URL:** <https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788>\
**Category:** PowerShell Help\
**Created:** [September 24, 2024, 10:44am UTC](https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788 "2024-09-24T10:44:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![World](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@World](https://forums.powershell.org/u/World)\
**Post date:** [September 24, 2024, 10:44am UTC](https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788/1 "2024-09-24T10:44:14Z")

</div>

hi everyone,  
im new in this world and i want to create a script  
i have specific folder with many pdf  
i want to print all the pdfs in this folder in one time  
for example the name of the folder is test.  
i trying many codes and nothing happened  
thank you for your help!

---

<div class="post-metadata">

**Author:** ![psdarwin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/psdarwin/32/2063_2.png) [@psdarwin](https://forums.powershell.org/u/psdarwin)\
**Post date:** [September 24, 2024, 1:23pm UTC](https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788/2 "2024-09-24T13:23:28Z")

</div>

Can you give some examples of your code so far?

---

<div class="post-metadata">

**Author:** ![World](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@World](https://forums.powershell.org/u/World)\
**Post date:** [September 24, 2024, 1:38pm UTC](https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788/3 "2024-09-24T13:38:20Z")

</div>

yea sure

# Set the folder path containing the PDF files

$folderPath = “C:\Users\User\Desktop\New folder”  
$printerName = “\Printer-Server\Main” # Your printer name

# Get all PDF files in the specified folder

$pdfFiles = Get-ChildItem -Path $folderPath -Filter \*.pdf

# Loop through each PDF file and print it

foreach ($pdfFile in $pdfFiles) {  
# Print the PDF using Adobe Reader  
Start-Process -FilePath “C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe” ` -ArgumentList "/t`"$($pdfFile.FullName)`" `"$printerName`"" `  
-NoNewWindow -Wait  
}

# Notify when printing is complete

Write-Host “Printing complete for all PDF files in $folderPath.”

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [October 24, 2024, 1:39pm UTC](https://forums.powershell.org/t/print-all-files-in-folder-in-one-time/24788/4 "2024-10-24T13:39:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
