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.

ftp://smarty:pants@myserver.com 

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

Thanks so much

Stephen
fmwebschoolAsked:
Who is Participating?
 
GranModCommented:
PAQed with no points refunded (500)

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

Stephen
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
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:

ftp://smarty:pants@myserver.com 

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

Thanks :)
Stephen
0
 
WelkinMazeCommented:
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
0
 
WelkinMazeCommented:
Hi LeeTutor,

I think my comment answers the question.
 
0
 
WelkinMazeCommented:
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.
0
 
m3techCommented:
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@72.109.220.75:21//C:/Downloads/updatelog.txt

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@72.109.220.75:21//C:/Downloads/updatelog.txt
Connecting to 72.109.220.75:21... 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@72.109.220.75:21//updatelog.txt
Connecting to 78.129.250.55:21... 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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.