Saving cURL downloaded file to a specified location

do shell script "curl -LO http://localhost"

i need to download the file to a certain location. is that possible? or shal i do that script then mv?

Certainly:

set downloadedFilePosixPath to (POSIX path of (path to desktop)) & "fileDownloadedWithCURL.ext"
-- "--option" can also be "-o" (likewise "--location" "-L"), but long option names are usually nicer to read if one has not memorized what the short options mean
do shell script "curl --location --output " & quoted form of downloadedFilePosixPath & " http://localhost" -- add "--create-dirs " before "--output " if the downloadedFilePosixPath includes local directories that might not exist yet (cURL will create them for you)

PS: Your thread title is awfully generic. It has very little to do with your real question. Something like “Saving cURL downloaded file to a specified location” would have been more informative.

Changed title to “Saving cURL downloaded file to a specified location” as suggested by chrys.

Cheers,

Craig