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.
- Windows
- Python 3.10+
curl.exeavailable on PATH
Recent Windows versions include curl.exe by default.
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.
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 1If the URL does not contain a filename, the tool generates one like:
download-1770000000.bin
- Uses
<filename>.partwhile 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.jsoninside the output folder.
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.
The test suite uses Python's standard library only.
python -m unittest discover -s testsCovered behavior includes:
- retry after a failed download attempt
- preserving partial files across retry
- resuming an existing
.partfile - output-folder locking
- filename parsing and sanitization
- remote size parsing from HTTP headers
Runtime dependencies are intentionally minimal:
- Python standard library
- Windows
curl.exe
No third-party Python packages are required.
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
curlinstead ofcurl.exe - add
.shlaunch examples - test lock/process behavior outside Windows
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.