views:

152

answers:

1

Im trying to use a variable in Automator to save images into a specific folder.

Strangely when you create a new folder and you use a variable, it allows you to set the base path... but if you try to "Download URL" it does not allow you to select the base path to add the variable onto and it breaks the transaction.

Im sure applescript could do a better job, but I can't seem to figure it out.

Example.

There is a photo gallery called Cats and Dogs.

I am able to grab the Cats and Dogs title and make it my variable... it makes a new folder on my desktop called Cats and Dogs (from the Variable)... I am then able to grab all the images in the gallery as a result from "Get Image URL's from webpage"...

This works great... then I try to "Download the URLs" and I want to download them to the new "Cats and Dogs" folder I have created. But I can't seem to make that work, because I can't set the path in the Download the URLs box in automator...

This ends up being really useful when I have 100 galleries I need to rip to my desktop...

Of course I could move the files in the newly created folder by hand once saved... but then I would have to do this for each gallery...

Any suggestions?

+1  A: 

From applescript you can use the command line program curl to download something. With the -o option you can specify where to save the download. So you would need an applescript like this...

do shell script "curl http://url.of.image -o /path/to/output/file"
regulus6633
Excellent advice. Thank you.
fighella