Solved

Using WPUT to transfer multiple files to an FTP site

Posted on 2007-10-02
5
3,557 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 500 total points
ID: 20008272
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Have you ever stumbled upon a software that is so great that you just love? It happened to me. Love at first sight. Filezilla Server.   Ok its not the most advanced ftp server I've came across. But its a fairly simple piece of software to get the …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

914 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

18 Experts available now in Live!

Get 1:1 Help Now