Automating Batch Download Images From Url - Excel
Soxiin
![]()
- Joined: Jan 14, 2012
- Posts: 7
I have an Excel file with a column for image links and a column for titles. I want to batch download all the image links and have the downloaded images assigned the titles from the title column. Is this something that can be accomplished with WinAutomation?
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
Hello!
Yes, this can definitely be done using WinAutomation. Your script should look something like this:
Launch Excel (this will open the excel file that you have the data stored within)
Get first free row (to get the number of rows used in the file)
Read From Excel (read the first two columns of data from the excel file - here we assume that the first column contains the url and the second contains the title)
For Each (we shall loop through each row of the excel table retrieved - each iteration will hold the data for each row)
Download the image from the url (%CurrentRow[0]%) of the current row and save it to the selected folder naming it after the title (%CurrentRow[1]%)
End Loop
I'm also attaching a sample script to make things a bit easier!

Samantha
Soxiin
![]()
- Joined: Jan 14, 2012
- Posts: 7
Hello Samatha,
The script you provided worked great, it saved me weeks of work. Thank you very much.
Soxiin
![]()
- Joined: Jan 14, 2012
- Posts: 7
..
vivekmartin
![]()
- Joined: Jun 19, 2012
- Posts: 2
Hi Samantha,
Nice piece of script there!
Is it possible to batch download from a URL within another?
In this URL, below the picture of the mouse there is a link to view larger images, these are the ones I need. Is that possible by any chance?
Cheers!
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
Hello vivekmartin,
Welcome to our Forum! Please check the script attached, it should do what you're after

Samantha
vivekmartin
![]()
- Joined: Jun 19, 2012
- Posts: 2
Thanks Sam. My bad, I wasn't clear in what I wanted.
I have attached an Excel Sheet for your reference. I need the link in Column A to be accessed and then the "View Larger Images" to be accessed from that link. Then all pictures in that link need to be downloaded into a folder named as corresponding Column B.
If possible, I need the image file to be named as the header of the image. In the above link's case the first image should be named as "Genius Navigator T835 Laser V2 Wireless Mouse" and so on.
Hopefully I'm not asking for too much...![]()
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
Please check the script attached, it should do what you're after.

Samantha
klewis888
![]()
- Joined: Nov 4, 2012
- Posts: 2
I am also trying to batch download image links and have the image downloaded to my computer. I have all the image urls in an excel sheet. I created the job with the scripts from Samantha, but can't seem to locate the last step (Download the image from the url (%CurrentRow[0]%) of the current row and save it to the selected folder naming it after the title (%CurrentRow[1]%). What category is that under?
Any help would be greatly appreciated!
Thank you in advance. :)
klewis888
![]()
- Joined: Nov 4, 2012
- Posts: 2
Thank you so much Samantha for the script! You also saved me weeks of work!!! Amazing program! :)
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
You're most welcome!!!

Samantha
siddhanta
![]()
- Joined: Nov 20, 2012
- Posts: 5
Hi,
I ran the script given by samantha. Ran fine but the output is improper format. Its not a image.
How to set the output file extension.
Thanks!
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
Reply to last post can be found here:
http://www.winautomation.com/forum/download-images-link

Samantha
gkintl
![]()
- Joined: Feb 9, 2013
- Posts: 1
Hi Samantha,
I downloaded your sample script, I have an excel, the first column is URL and the second column the name that I want to save as the images with. But at the job is giving me "runtime error: Failed to download from web, the remote server returned on error 404" , the urls are working fine and the images are displaying correctly when I click on them. there is nothing wrong with the server...
Is there a way we can fix that error? I have over 2000 links need to be downloaded, and it will really help me.
Thanks,
GK
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2326
Hello there!
Welcome to our forum!
Please do feel free to upload here a copy of your excel spreadsheet (or even a part of it that we could use as a test, to help you edit the script based on your needs!

Samantha