
iload
Multithread file downloader
Install
-
First, install golang:
https://go.dev/doc/install
-
Then type in console:
$ go install github.com/sergrom/iload
Usage
To see parameters and options type:
$ iload -h
Example
If you want to download files with urls listed in /path/to/input/file.txt
to directory /directory/to/output/
with 5 threads
and verbose
mode type:
$ iload -f /path/to/input/file.txt -d /directory/to/output/ -t 5 -v
or
iload --input-file="/path/to/input/file.txt" --output-dir="/directory/to/output/" --threads-num=5 --verbose
Parameters and options
-h
, --help
help for iload
-f
, --input-file
string Input file with urls you want to download. Each url must be in separate line
-d
, --output-dir
string Output directory to which you want to save downloaded files
-t
, --threads-num
int Number of threads (default 5)
-v
, --verbose
Verbose
The input file must be specified by parameter -f
and must contain a list of urls to files.
Each url should be in separate line like this:
http://site.com/path/to/file1.jpg
http://site.com/path/to/file2.jpg
http://site.com/path/to/file3.jpg
The program will try to download and save files with names: "file1.jpg", "file2.jpg", "file3.jpg" to output directory.
If you want to save files with another names, you can specify them like this:
http://site.com/path/to/file1.jpg|first_file.jpg
http://site.com/path/to/file2.jpg|second_file.jpg
http://site.com/path/to/file3.jpg|third_file.jpg
The program will try to download and save files with names: "first_file.jpg", "second_file.jpg", "third_file.jpg" to output directory.
If while saving some file with name file.jpg
it happens that file with same name is already exists,
the program wil try to save it with name file_1.jpg
.
If such file also exists, it will try to save the file with name file_2.jpg
, and so on unil file_99.jpg
, then program will start to rewrite files in output directory. So if you want to prevent rewriting downloaded files, please specify file names explicitly.
Output directory
The output directory must be specified by parameter -d
.