I need to upload a file with wput to my ftp server

I need to upload a file to my ftp server.  I need the proper syntax to upload a file named "clients.txt" to my server.


How can I add "clients.txt" to that directory?  Will it automatically overwrite the other "clients.txt" on that directory?

Thanks so much

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I suppose this will work and overwrite the existing files if any:
wput clients.txt ftp://smarty:pants@myserver.com 
fmwebschoolAuthor Commented:
Thank you for your answer. let me try :)

fmwebschoolAuthor Commented:
That does not seem to work.  If I have the file "clients.txt" on my "C" drive and I need to upload it to:


What would be the exact syntax I would need to use?

Thanks :)
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

If it is in your main C drive directory try:
wput c:\clients.txt ftp://smarty:pants@myserver.com
or you can try to copy the file into the directory where wput program is and to try again the first version of the command:
wput clients.txt ftp://smarty:pants@myserver.com
Hi LeeTutor,

I think my comment answers the question.
Thanks for the answer!
I completely understand you. And I agree that we cannot say if my comment has helped the questioner. Although I think in general it answers to the question that the asker has asked (also having in mind the link you've mentioned above).
And I absolutely agree that the site owner(s) has the right to decide (or recommend) what is "correct" even if it is not for someone.
PAQed with no points refunded (500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I agree, Stephen's answer most likely answered the question. I was having the same issues as fmwebschool. Stephen's answer, though not the clearest worked for me. Full details follow:

The code snippet shows 2 (sterilized) wput commands. The first command fails with a "Failed to change to target directory" message. Notice the line:

--23:11:51-- `C:/Downloads\updatelog.txt'   => ftp://user:xxxxx@

This means wput attempted to transfer c:\downloads\updatelog.txt to
[FTP site]\c:\downloads\updatelog.txt

This is what causes the error, subdirectories \c:\downloads do not exist below the root of my ftp server. The easiest solution is to move the file (or move wput - it's tiny) to the same directory. This is what I did before issuing the second, successful wput command.

C:\wput-pre0.6>wput C:\Downloads\updatelog.txt ftp://user:pass@f.control.net//
--23:11:51-- `C:/Downloads\updatelog.txt'
    => ftp://user:xxxxx@
Connecting to connected!
Logging in as user ... Logged in!
Failed to change to target directory. Skipping this file/dir.
FINISHED --23:11:57--
Transmission of 1 file failed.

C:\wput-pre0.6>wput updatelog.txt ftp://user:pass@f.control.net//
--23:18:28-- `updatelog.txt'
    => ftp://user:xxxxx@
Connecting to connected!
Logging in as user ... Logged in!
Length: 144
100%[===================================] 144
23:18:30 (updatelog.txt) - ` 1021B/s' [144]

FINISHED --23:18:30--
Transfered 144 bytes in 1 file at 56.54B/s

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.