Solved

Using WPUT to transfer multiple files to an FTP site

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

707 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