Hannah James
Hannah James

Reputation: 570

wget with bash command and save to other folder

I am downloading bulk images from with bash command and here is my sample file list.sh

wget    https://www.japanesebuyers.com/jct/vehicle_image/2223787_a.jpg -O image1.jpg
wget    https://www.japanesebuyers.com/jct/vehicle_image/1_15450940845c1843c49b959.jpeg -O  image2.jpg

when I run this command in terminal ./list.sh it download file in the same folder. I want to save files in /images/ folder

enter image description here

Upvotes: 0

Views: 310

Answers (1)

Puck
Puck

Reputation: 2120

You have to tell the wget command you want to download your images in the images folder. The -O is the output. If you add -O ./images/image1.jpg it should work.
Alternatively, if you don't want to add the folder in each command, you can cd in the appropriate folder with cd images before calling wget.

Upvotes: 2

Related Questions