Skip to main content

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:

  1. Process all PDF and Excel files in the "Reports" folder and its subfolders
  2. Create a new folder named "Protected Reports"
  3. Save encrypted versions of all files in the new folder
  4. 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

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fileprotector-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fileprotector-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for fileprotector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e4aa83b875d038ff1df32967636ea96f2388536cf2bff84a8dc2da8aa9685f84
MD5 af1e10483d80fd280149d0df87cc06e4
BLAKE2b-256 4996c6b98b61559932409504ca9a0b982bb70e8b40ab03e5ae6b5bf79f2fefa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fileprotector-0.1.2.tar.gz:

Publisher: publish.yml on yaliach/file-protector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for fileprotector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4c936825b39f9009292d9a90d7b8ae526bef8748da1393a77c78f368e0a4848
MD5 534f993ea303ee3cdbceb4e876bddc89
BLAKE2b-256 859ce08b2151bf0d088bf0b5c8ba25331437c323cc7b66070afb9bdd39788fd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for fileprotector-0.1.2-py3-none-any.whl:

Publisher: publish.yml on yaliach/file-protector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page