I am trying to open some website url links with a parameter in my browser. I made a batch file using this code :
@echo off
start "images" "www.images.com/1000/image.jpg"
start "images" "www.images.com/1001/image.jpg"
start "images" "www.images.com/1002/image.jpg"
...
...
start "images" "www.images.com/5000/image.jpg"
All I want is to create a For loop that will do that :
For (i=1000; i<5000 ; i++)
{
start "images" "www.images.com/i/image.jpg"
}
where "i" is a parameter of the website link. I am new in the batch file creation and I cannot figure out how to make it work. I tried this one but it did not work:
for i in {1000..5000}
do
start "images" "www.images.com/$i/image.jpg"
This question is a first step. Then i want to save the images shown on this links, only if the links are valid (not dead like in 403, 404 errors)
You didn't even try using correct syntax, instead assuming that cmd is like bash. Yay.
What you're looking for can be found with
help for
:I'm unsure how you even plan to proceed from here, though, as your current approach will not allow you to save images. Also opening 4000 tabs in your browser will likely be not fun either.
You may want to take a look at PowerShell where the whole task you described is trivial:
And even without the need for external programs (e.g. wget or curl).