Hallo,
I'm a noobi in Powershell and my english is very bad =).
I would be glad for any help.
OK Task: I have 2 Folders ('A' and 'B'). If someone copy .PDF files into Folder 'A', my script has to print this PDF file and then replace it into Folder 'B'.
Script:
do
{
Get-Childitem C:\A *.pdf | Foreach { Start-Process -WindowStyle Hidden -FilePath $_.FullName –Verb Print -PassThru | %{sleep 10;$_} | kill}
cd C:\A
Copy-Item *.pdf C:\B
Get-Childitem C:\A *.pdf | del
Start-Sleep 6
}
while (1)
The Problem : script select automaticly the default Printer, but i want to use an other Printer!!
Till now i can print an only 1 File (static):
Start-Process AcroRd32.exe {/t C:\A\hello.pdf "MyPrinterName"}
Its all what Pdf-reader allows me.
If someone knows how i can combine these 2 scripts pls tell me.
Thanks =)
I'm a noobi in Powershell and my english is very bad =).
I would be glad for any help.
OK Task: I have 2 Folders ('A' and 'B'). If someone copy .PDF files into Folder 'A', my script has to print this PDF file and then replace it into Folder 'B'.
Script:
do
{
Get-Childitem C:\A *.pdf | Foreach { Start-Process -WindowStyle Hidden -FilePath $_.FullName –Verb Print -PassThru | %{sleep 10;$_} | kill}
cd C:\A
Copy-Item *.pdf C:\B
Get-Childitem C:\A *.pdf | del
Start-Sleep 6
}
while (1)
The Problem : script select automaticly the default Printer, but i want to use an other Printer!!
Till now i can print an only 1 File (static):
Start-Process AcroRd32.exe {/t C:\A\hello.pdf "MyPrinterName"}
Its all what Pdf-reader allows me.
If someone knows how i can combine these 2 scripts pls tell me.
Thanks =)