Finds all PDFs in a folder and removes their metadata. Also updates the PDF Title metadata to match the filename (without the .pdf
extension).
exiftool
installed and accessible in your system PATH.
-
macOS (Homebrew):
brew install exiftool
-
Ubuntu/Debian:
sudo apt update sudo apt install libimage-exiftool-perl
-
Windows: Download and install from exiftool.org, then add it to your system PATH.
- Clone or download this repo.
- Place your PDF files in the target folder.
- (Optional) Edit the
folder
variable inclean-pdfs.sh
to point to your folder. Use.
for the current directory. - Make the script executable:
chmod +x clean-pdfs.sh
- Run the script:
./clean-pdfs.sh
- Recursively finds all
.pdf
files in the specified folder. - Removes all embedded metadata.
- Sets the PDF Title metadata to match the filename (excluding
.pdf
).
MIT
Built by FullSphere