Setting Target Directory in cURL FTP transfer

Posted on 2009-04-18
Last Modified: 2013-12-09
I'm using cURL comand lines to transfer files to an FTP site. I can get the files to transfer, but need to send them to a certain subdirectory on the FTP site. What is the cURL syntax to set the target directory? My cURL command line example is in the code section.
curl.exe -T uploadfile.txt -u user:password

Open in new window

Question by:jhb126
    LVL 68

    Accepted Solution

    curl.exe -T uploadfile.txt -u user:password

    Note the extra slash / in front of the filename, which is used to specify an absolute path!


    LVL 28

    Expert Comment

    just curious, why do you use curl rather than the regular ftp client? SSL?

    Author Closing Comment

    Quick & Easy

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Cloud file services can fill many different roles for your business. Often, the use of cloud file services begins with employees using consumer products, like Dropbox, to share files with customers and each other. While sync-and-share can be an effe…
    Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now