?
Solved

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

Posted on 2006-04-07
10
Medium Priority
?
2,345 Views
Last Modified: 2010-01-08
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
0
Comment
Question by:fmwebschool
8 Comments
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16403482
I suppose this will work and overwrite the existing files if any:
wput clients.txt ftp://smarty:pants@myserver.com 
0
 

Author Comment

by:fmwebschool
ID: 16403945
Thank you for your answer. let me try :)

Stephen
0
 

Author Comment

by:fmwebschool
ID: 16404039
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16404055
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
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16568775
Hi LeeTutor,

I think my comment answers the question.
 
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16568831
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
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16593968
PAQed with no points refunded (500)

GranMod
Community Support Moderator
0
 
LVL 2

Expert Comment

by:m3tech
ID: 26251529
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

750 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