How to FTP to a directory?

Username (e.g. epiz_XXX) or Website URL

lindacom.infinityfreeapp.com

Error Message

failed ftp upload

Other Information

I am able to ftp to the root directory using the curl command $ curl -u username:password -T test.txt ftp://ftpupload.net/

How do I ftp to a directory e.g htdocs. I tried ftp://ftpupload.net/htdocs and ftp://ftpupload.net/ /htdocs but this does not work.

Can you try to use a ftp client like filezilla

1 Like

Thanks but I would like to use curl in the gitbash commandline as I am learning how it works.

Interesting, I had no idea that it was possible to do FTP with cURL. I’ve used cURL quite a bit, but only with HTTP.

Last time I did FTP on the command line, I used the lftp program for that.

Although, I do suppose you could try:

curl -u username:password -T test.txt ftp://ftpupload.net/htdocs/

The trailing slash may be important, it can be the difference between uploading the file TO the htdocs folder or AS the htdocs folder entry.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.