Created
March 24, 2020 09:37
-
-
Save mike623/7884f87032b505b5fa0acbb2211aca4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# unprotect multiple pdf files in a directory with qpdf 10Jan20 | |
# run the script from the same directory as the files | |
if [ -d output ]; | |
then | |
echo "output directory exists" | |
else | |
mkdir output | |
fi | |
yourfilenames=`ls *.pdf` | |
#echo yourfilenames | |
for eachfile in $yourfilenames | |
do | |
echo $eachfile | |
qpdf --decrypt $@ $eachfile output/$eachfile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment