Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Script Ever!!! FTP from Unix to Windows Server Running IIS 2

Status
Not open for further replies.

Dauphy

IS-IT--Management
Nov 8, 2001
111
CA
Okay... I've tried and tried and now I'm stuck. I've even had to try my hand at self-teaching vi today. Thank god for the net. I've tried a few examples on this post. This is what I have so far: it will send one file over. I need the files contained in a whole directory ftp'd over. Help!

ftp_pwd=patti@test.com
ftpfile=patti
ftp -ni 100.0.2.41 <<EOF
user $ftp_user $ftp_pwd
ascii
mput $ftpfile
bye
EOF


 
In the ftp's man page have a look at the mget and prompt commands.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
But I'd like to eventually cron it so that prompts don't have to be filled in. I'd like the script to traverse through the directory and send all the files in the directory to the Windows 2003 server. And then I'd like to move all the files it ftp'd over to another directory so that there is an empty directory. (but that's another step)... :)
 
prompt toggles prompting on or off. By default it is on, so issuing a prompt within ftp turns it off. Then you can issue an mput * to send all the files in the directory you are in without any prompting.

I want to be good, is that not enough?
 
Shoot... I had tried a *.* (LOL). Thanks I'll have to try this on Monday.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top