Downloading file from FTP using cURL

Posted by Josiah on Super User See other posts from Super User or by Josiah
Published on 2011-03-31T21:08:01Z Indexed on 2012/10/30 23:07 UTC
Read the original article Hit count: 244

Filed under:
|
|

I'm trying to use a cURL command to download a file from an FTP server to a local drive on my computer. I've tried

curl "ftp://myftpsite" --user name:password -Q "CWD /users/myfolder/" -O "myfile.raw"

But it returns an error that says:

curl: Remote file name has no length!
curl: try 'curl --help' or 'curl --manual' for more information
curl: (6) Could not resolve host: myfile.raw; No data record of requested type

I've tried some other methods, but nothing seems to work.

Also, I'm not quite sure how to specify which folder I want the file to be downloaded to. How would I do that?

© Super User or respective owner

Related posts about download

Related posts about ftp