Skip to content

Instantly share code, notes, and snippets.

@Humberd
Created March 31, 2025 18:41
Show Gist options
  • Save Humberd/f187f83dfc82759ea7823c3efd9be2b4 to your computer and use it in GitHub Desktop.
Save Humberd/f187f83dfc82759ea7823c3efd9be2b4 to your computer and use it in GitHub Desktop.
Decrypts all the pdf files and stores them in a separate directory
New-Item -ItemType Directory -Path "./decrypted" -Force
$pass = "<password>"; $outDir = "./decrypted"; New-Item -ItemType Directory -Path $outDir -Force; Get-ChildItem *.pdf | % { qpdf --decrypt --password=$pass $_.FullName (Join-Path $outDir $_.Name) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment