Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resumable Downloader

A simple Windows-first CLI downloader that survives bad connections and resumes from partial files.

It is designed for large direct file URLs where a browser download may fail, lose progress, or show stale speed/ETA numbers after a connection drop.

Requirements

  • Windows
  • Python 3.10+
  • curl.exe available on PATH

Recent Windows versions include curl.exe by default.

Quick Start

Double-click:

Download Any File.bat

Paste a direct file URL when prompted. Files download to:

downloads\

If you close the window or lose connection, run it again with the same URL. The download resumes from the .part file.

Command Line

Download a file into downloads\:

python resumable_downloader.py "https://example.com/file.zip"

Choose a different output folder:

python resumable_downloader.py "https://example.com/file.zip" --output-dir "D:\Downloads"

Choose a custom filename:

python resumable_downloader.py "https://example.com/file" --filename "file.zip"

Use a shorter retry delay while testing:

python resumable_downloader.py "https://example.com/file.zip" --retry-delay 1

If the URL does not contain a filename, the tool generates one like:

download-1770000000.bin

Behavior

  • Uses <filename>.part while downloading.
  • Uses curl.exe --continue-at - for resume support.
  • Retries forever after network errors.
  • Recalculates speed and ETA fresh every time it starts.
  • Uses a lock file so two downloaders do not write to the same output folder at the same time.
  • Stores the last attempted URL and filename in .resumable_downloader_state.json inside the output folder.

Examples

Download to the default folder:

python resumable_downloader.py "https://speed.hetzner.de/100MB.bin"

Download to another drive:

python resumable_downloader.py "https://speed.hetzner.de/1GB.bin" --output-dir "D:\Downloads"

Resume an interrupted download:

python resumable_downloader.py "https://speed.hetzner.de/1GB.bin" --output-dir "D:\Downloads"

The second command resumes from D:\Downloads\1GB.bin.part if it exists.

Tests

The test suite uses Python's standard library only.

python -m unittest discover -s tests

Covered behavior includes:

  • retry after a failed download attempt
  • preserving partial files across retry
  • resuming an existing .part file
  • output-folder locking
  • filename parsing and sanitization
  • remote size parsing from HTTP headers

Dependency Policy

Runtime dependencies are intentionally minimal:

  • Python standard library
  • Windows curl.exe

No third-party Python packages are required.

Cross-Platform Support

The current release is Windows-first because it calls curl.exe and ships with a .bat launcher. The core Python code is mostly portable, and future Linux/macOS support should only need:

  • use curl instead of curl.exe
  • add .sh launch examples
  • test lock/process behavior outside Windows

Notes

This tool is for direct file URLs. It does not scrape download pages or handle sites that require browser login flows. If a URL needs cookies, tokens, or a logged-in browser session, use a direct authenticated URL generated by that site.

About

A Windows-first resumable file downloader with retry, ETA, and partial-download recovery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages