i need to write a line in my script to download a directory(having about 10 images)from a url like abc.com/Image/images/,trying wget command as below in the script :
wget -e robots=off -r -l1 –no-parent -A.gif http://abc.com/Image/images/ OR
wget -A “*.gif” http://abc.com/Image/images/
but it is giving error as :
HTTP request sent, awaiting response… 403 Forbidden
11:25:12 ERROR 403: Forbidden.
Removing abc.com/Images/images/index.html since it should be rejected.
unlink: No such file or directory
I am already using the wget command to download one file from the same URL and it is working fine but in case of directory it is failing.
Can anyone help me quickly in this?
If you know names (you have to, if the remote dir is not “open” and the content can’t be listed), consider having them into a file and use a
fororwhile(in bash or powershell or what you have) or similar; if the names follow a “pattern”, consider usingcurlinstead, with it you can do things liketo download images with names img00.gif, img01.gif and so on.