R
R
robprane2021-03-11 17:35:49
Wget
robprane, 2021-03-11 17:35:49

How to download many files from links, replacing their names?

I want to download almost 7 thousand images. For each there is a link and a file name that I want to get as a result. The names will be different from the original ones. And explicit dependencies, so that you can then go through regular expressions, most likely will not work.
I'm sure curl or wget can be configured to download and rename line by line. Or someone can suggest programs that implement the same.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pumpkinm, 2021-03-11
@robprane

wget -O newname1.jpg http://www.url1.com/image1.jpg

etc.
In a batch file:
make a list file with a separator, like this, for example
newname1.jpg$ www.url1.com/image1.jpg
newname1.jpg$ www.url1.com/image1.jpg
newname2.jpg$ www.url1.com/image2.jpg
newname3.jpg$ www.url1.com/image3 .jpg

and bat file like
for /F "usebackq tokens=1,2 delims=$" %%i in ("list.txt") do wget -O "%%i" "%%j"

V
Viktor Taran, 2021-03-11
@shambler81

an example was needed, it became the same logic by which you need to rename them, if it is not there, then the file was

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question