[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using WPUT to transfer multiple files to an FTP site

Posted on 2007-10-02
5
Medium Priority
?
3,693 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
ID: 20002762
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
ID: 20003733
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
ID: 20007875
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
ID: 20008114
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 1500 total points
ID: 20008272
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

873 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