This Python script compresses and password-protects files in a given directory. It reads environment variables from a .env
file to determine the input and output directories, as well as the password to use for encryption.
- Python 3.6 or later
- pyminizip package (
pip install pyminizip
)
- Clone this repository.
- Install the required package:
pip install pyminizip
.
Configure and rename .env.example to .env
INPUT_DIR
: The directory containing the files you want to compress.OUTPUT_DIR
: The directory where the compressed files will be saved.PASSWORD
: The password to use for encrypting the compressed files.
Example .env
file:
# .env.example
INPUT_DIR=input
OUTPUT_DIR=output
PASSWORD=1234
Open a terminal and navigate to the directory containing the script and the .env
file. Then, run the script:
python main.py
For contributing to this project, please feel free to open an issue or submit a pull request.
- Website carlos8a.com
- GitHub @CarlosUlisesOchoa
- X @Carlos8aDev