The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
transfer file from unix to windows on same PC monika UNIX for Dummies Questions & Answers 4 05-28-2008 06:35 AM
Unzip windows file on Unix terala_s UNIX for Advanced & Expert Users 6 11-09-2007 09:55 AM
How to send a trigger file from Unix to Windows robw95 UNIX for Dummies Questions & Answers 0 04-12-2006 05:07 PM
How do I send a file as an attachment (gzip file) on a Unix system lacca UNIX for Dummies Questions & Answers 3 07-03-2002 01:04 PM
send file from UNIX to windows across network umpi_97 UNIX for Dummies Questions & Answers 5 02-20-2002 03:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-28-2006
edzela edzela is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 2
How send a file from UNIX to Windows with FTP

Hi
I'm new working in UNIX, So, I want to know How I can send a file from UNIX to Windows server with FTP. This is my script.

ftp -i -n -v <<**

open 199.99.99.99
user user1 password1
lcd C01_07_06 /* source/
cd //199.98.98.98/group1/reports /*destination*/
put file1.sh
bye

It's not working beacuse of cd command says destination is not a directory and the directory exists, the ping to 199.98.98.98 is working.

Thanks for your answers.
  #2 (permalink)  
Old 08-28-2006
qfwfq qfwfq is offline
Registered User
  
 

Join Date: Feb 2005
Location: Canada
Posts: 133
Here is another way...this one is working fine since I am using it:

Code:
#! /usr/bin/ksh

HOST=ftp_server_ip
USER=your_login
PASSWD=your_password

exec 4>&1
ftp -nv >&4 2>&4 |&

print -p open $HOST
print -p user $USER $PASSWD
print -p cd /home/your_login
print -p binary
print -p put test.txt
print -p bye

wait
exit 0
Make sure you run the script where your file is or change directory first in your script.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0