Closing a file powershell -


I am trying to write a script that opens all PDF files in a folder, prints them, and then File closes I have been working in the first 2 parts, although I can not find any way to close the files later. I did some Google searches but could not find anything. I am new to PowerShell, so if you have a better way of doing this then please let me know:

  go-hair item-filter * .pdf | Foreach object {# file item variable $ _ write host is "print: $ ($ _. Name)" Open file with # print command   

Itemprop = "text">

I do not have experience with it, but was curious about the start-process CMDlet with print operation. I went and came with this which proves to be a good solution to your problem:

  Start-up-filepath $ .FullName -Verb Print -PassThru | % {Sleep 10; $ _} | Kill   

source:

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -