The Why

One of the things I enjoy is watching stuff online. When I come across media that I’ll likely watch in the future, I download it. Sometimes, after a hard day of work or study, I feel like rewarding myself. I can easily do that by watching the media I’ve downloaded.

However, there’s something called binge-watching, which can turn what was supposed to be a rewarding experience into a feeling of emotional dread. This is a small but meaningful problem to solve.

The problem of binge-watching can be tackled by introducing an external factor. Something that either stops us from mindlessly watching the next thing or allows us to watch just the one thing we rationally decided was enough of a reward.

To cut to the chase, the idea is to give access control of our reward media to someone else. This “someone else” can be anyone you trust. Someone who will only give you access when you ask for it. Most likely a friend equivalent, to be honest, your father isn’t going to agree to any of this nonsense, is he?

It’s actually quite simple to set up: just create individual password-protected zip files for each media file, and share the passwords with your friend. Make sure the passwords are complex enough that you won’t remember them after deleting them from your own records.

Whenever you feel the need to access a media file, simply ask your friend for the password. This should create enough friction for you to not slip into binge-watching.

Here’s how you can setup this efficiently:

Step 1: Install the Tools (Only Once)

Linux (Debian/Ubuntu):

sudo apt update
sudo apt install zip unzip

macOS (via Homebrew):

brew install zip unzip

Windows:

Install 7-Zip.

Step 2: Encrypt Each File with a Unique Password

For Linux/macOS

Create a folder for your project and follow this structure:

your-folder/
├── input/            # Put your media files here
├── encrypt_files.sh  # Script goes here

encrypt_files.sh

#!/bin/bash
 
INPUT_DIR="./input"
OUTPUT_DIR="./encrypted"
PASSWORD_FILE="passwords.txt"
 
mkdir -p "$OUTPUT_DIR"
> "$PASSWORD_FILE"
 
for filepath in "$INPUT_DIR"/*; do
    filename=$(basename "$filepath")
    password=$(openssl rand -base64 16)
    echo "$filename: $password" >> "$PASSWORD_FILE"
 
    zip -P "$password" "$OUTPUT_DIR/${filename}.zip" "$filepath"
    echo "Encrypted: $filename"
done

How to Use:

  1. Add files to the input/ folder.
  2. Make the script executable:
chmod +x encrypt_files.sh
  1. Run it:
./encrypt_files.sh

You’ll get:

  • .zip files in the encrypted/ folder
  • A passwords.txt mapping each file to its password

For Windows

Create a folder for your project and follow this structure:

your-folder\
├── input\             # Put your media files here
├── encrypted\         # Will contain encrypted zips
├── encrypt_files.bat  # Script goes here

encrypt_files.bat

@echo off
setlocal enabledelayedexpansion
 
set INPUT_DIR=input
set OUTPUT_DIR=encrypted
set PASSWORD_FILE=passwords.txt
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
 
if not exist %OUTPUT_DIR% mkdir %OUTPUT_DIR%
echo. > %PASSWORD_FILE%
 
for ~nxf"
    for /f p"
 
    echo !filename!: !password! >> %PASSWORD_FILE%
    %SEVENZIP% a -p!password! -mhe=on "%OUTPUT_DIR%\!filename!.7z" "%%f" >nul
    echo Encrypted: !filename!
)
 
echo Done.
pause

How to Use:

  1. 7-Zip must be installed in the default location:
    C:\Program Files\7-Zip\7z.exe
    If it’s installed elsewhere, update the script with the correct path to 7z.exe.
  2. Open Notepad, paste the script into it.
  3. Save the file as: encrypt_files.bat. Use “All Files” for Save as type, not .txt.
  4. Place the .bat file in the same folder where input folder is located.
  5. Right-click on the .bat file and select “Run as administrator”.

This creates:

  • Encrypted .7z files
  • A passwords.txt file

Step 3: Share the Password

  1. Share passwords.txt with your friend(s).
  2. After sharing, delete the input folder and passwords.txt.

Step 4: Decrypting the Files

To unzip a file:
Ask the password from your friend. Then:

Linux/macOS:

unzip -P "THE_PASSWORD" media1.mkv.zip

Windows:

  1. Right-click the .zip file.
  2. Choose 7-Zip → Extract Here.
  3. Enter the password when prompted.

After Thoughts

I hope this was a helpful read. I hope you’ve a friend. I hope the windows script works, even though I haven’t tested it.
I am assuming you will not tend to download the files again from the original source. Browser extensions can help you gain control over that.

No Time to Die (2021)

The proper function of man is to live, not to exist. I shall not waste my days in trying to prolong them. I shall use my time.