Hi,
I have 1000 image url in my text file(sample.txt) and i want to download the images using the url. Can anyone please share with me the sample script which can do this in single shot.
Also, is there any way to reduce the size of the image into 20/20 px with png extension.
Thanks
Help Needed in Batch script
Moderator: DosItHelp
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Help Needed in Batch script
Are you able to use third-party software? cURL or wget can easily download files. The script will look something like
Image editing is absolutely impossible with native batch, but I'm sure there are image resizers out there that can take command line arguments.
Code: Select all
@echo off
for /f %%A in (sample.txt) do wget %%A
Image editing is absolutely impossible with native batch, but I'm sure there are image resizers out there that can take command line arguments.
Re: Help Needed in Batch script
Irfanview is free and has command line ability to resize images in all formats.
-
- Posts: 51
- Joined: 16 Nov 2014 20:28
Re: Help Needed in Batch script
Hi Shadow and Fox,
thanks for your reply . I could download the image which is hosted on external server outside of my state. but the process is slow. I enabled spider web on my machine. Is there anythinf to be done with Spider web can help me speeding up this?
The below sample only checks the only file exists.
Regular try :
With Spider Web
thanks for your reply . I could download the image which is hosted on external server outside of my state. but the process is slow. I enabled spider web on my machine. Is there anythinf to be done with Spider web can help me speeding up this?
The below sample only checks the only file exists.
Regular try :
Code: Select all
@echo off
for /f %%A in (Sample.txt) do D:\GnuWin32\GetGnuWin32\bin\wget-1.12.exe %%A
With Spider Web
Code: Select all
@echo off
for /f %%A in (url-list.txt) do D:\GnuWin32\GetGnuWin32\bin\wget-1.12.exe --spider %%A
Re: Help Needed in Batch script
The number of connections and the speed of your link are factors.
Just commenting here that it's kind not to saturate the link of a site where you are leeching files from.
Just commenting here that it's kind not to saturate the link of a site where you are leeching files from.
-
- Posts: 51
- Joined: 16 Nov 2014 20:28
Re: Help Needed in Batch script
thank you fox for the tip.