Encrypt PDF and Excel files in bulk using a password
Project description
File Protector
A cross-platform CLI tool to batch encrypt PDF and Excel files with password protection, while preserving the original folder structure.
Features
- Encrypts PDF and Excel (.xlsx, .xls) files with password protection
- Preserves original folder structure in the output
- Handles already encrypted PDFs with option to decrypt and re-encrypt
- Creates a new "Protected" folder with the original folder name
- Provides detailed operation summary and skipped files report
Installation
Install globally using pip:
pip install fileprotector
Usage
fileprotector <input_folder> <password>
Example:
fileprotector "C:\Users\Documents\Reports" MySecurePassword123
This will:
- Process all PDF and Excel files in the "Reports" folder and its subfolders
- Create a new folder named "Protected Reports"
- Save encrypted versions of all files in the new folder
- Maintain the original subfolder structure
Supported File Types
- PDF (.pdf)
- Excel (.xlsx, .xls)
Error Handling
The script provides comprehensive error handling for:
- Already encrypted PDFs
- Invalid files
- Permission issues
- Missing folders
A summary is provided after completion showing:
- Successfully processed files
- Skipped files with reasons
- Total count of processed and skipped files
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fileprotector-0.1.2.tar.gz.
File metadata
- Download URL: fileprotector-0.1.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4aa83b875d038ff1df32967636ea96f2388536cf2bff84a8dc2da8aa9685f84
|
|
| MD5 |
af1e10483d80fd280149d0df87cc06e4
|
|
| BLAKE2b-256 |
4996c6b98b61559932409504ca9a0b982bb70e8b40ab03e5ae6b5bf79f2fefa3
|
Provenance
The following attestation bundles were made for fileprotector-0.1.2.tar.gz:
Publisher:
publish.yml on yaliach/file-protector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fileprotector-0.1.2.tar.gz -
Subject digest:
e4aa83b875d038ff1df32967636ea96f2388536cf2bff84a8dc2da8aa9685f84 - Sigstore transparency entry: 265180763
- Sigstore integration time:
-
Permalink:
yaliach/file-protector@d0588678f187fb3ba4425030ae416e7ffdc89fc2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/yaliach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d0588678f187fb3ba4425030ae416e7ffdc89fc2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fileprotector-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fileprotector-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c936825b39f9009292d9a90d7b8ae526bef8748da1393a77c78f368e0a4848
|
|
| MD5 |
534f993ea303ee3cdbceb4e876bddc89
|
|
| BLAKE2b-256 |
859ce08b2151bf0d088bf0b5c8ba25331437c323cc7b66070afb9bdd39788fd2
|
Provenance
The following attestation bundles were made for fileprotector-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on yaliach/file-protector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fileprotector-0.1.2-py3-none-any.whl -
Subject digest:
d4c936825b39f9009292d9a90d7b8ae526bef8748da1393a77c78f368e0a4848 - Sigstore transparency entry: 265180765
- Sigstore integration time:
-
Permalink:
yaliach/file-protector@d0588678f187fb3ba4425030ae416e7ffdc89fc2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/yaliach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d0588678f187fb3ba4425030ae416e7ffdc89fc2 -
Trigger Event:
push
-
Statement type: