Solved

Using WPUT to transfer multiple files to an FTP site

Posted on 2007-10-02
5
3,538 Views
Last Modified: 2013-12-20
Hello,

I need to use wput to transfer some files to an ftp site.  Basically I have checked the solutions here, and what I need is to be able to transfer a bunch of files locally (say drive C:) to a specific directory on an ftp server.

I want to transfer all the files in a specific directory locally so I would need to possibly use some sort of wildcards for this to happen.

Anyone familiar with doing this?

I tried doing wput c:\Directory\File.txt ftp://smarty.pants@myserver.com  which gave me the error of "failed target directory, which is fine, I didn't expect it to work, but I want to not transfer one specific file but them all.

Thanks for the help in advance.
0
Comment
Question by:grooverider80
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:ckhsu1977
Comment Utility
check this link
http://en.wikipedia.org/wiki/Wput

Also check your usage
wput files ftp://user:password@host/dir/
0
 
LVL 14

Expert Comment

by:arrkerr1024
Comment Utility
Is ftp the only option or is scp or rsync available (ie: can you connect w/ssh)?

If the host os was unix you could do
for file in `find sourcedir -type f`; do wput $file ftp://smarty.pants@myserver.com; done

But it looks like windows... do  you need to use wput, or could you use a free ftp client like filezilla (http://filezilla-project.org/) that would let you just drag-and-drop the source directory?
0
 

Author Comment

by:grooverider80
Comment Utility
The problem is it is a Windows based ftp, and the reason I need this done is because we are doing a massive number of .pdf files at all times of the day, so I wanted something to pull all the files out every so often and and put them in another directory (local drive to ftp dir).  

I'm not sure wput is the solution for this..and filezilla would be too much of a pain because I would have to do it manually all the time during the day.

0
 

Author Comment

by:grooverider80
Comment Utility
ok, this works:

wput . user.password@servername

That transfers all the files from the local directory that you have selected in the dos prompt to the ftp site, what would you add on the end of that to pick a specific directory?

Also, could I slap this into a .bat file to run every 5 minutes and if I could how would I do that?
0
 
LVL 3

Accepted Solution

by:
ckhsu1977 earned 500 total points
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

6 Experts available now in Live!

Get 1:1 Help Now