Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using WPUT to transfer multiple files to an FTP site

Posted on 2007-10-02
5
Medium Priority
?
3,658 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

618 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