ftp from unix to windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp from unix to windows
# 1  
Old 09-05-2008
ftp from unix to windows

How to do ftp from unix to windows

i have some files in a dir in unix box and i want to put those files in windows through FTP. How to do this ?
# 2  
Old 09-05-2008
Windows does not normally run an FTP server, so you will probably need to 'get' the files using the Windows FTP client.

Otherwise you will need to configure IIS or some other FTP server under Windows.
# 3  
Old 09-05-2008
or you may set samba on unix server ?
# 4  
Old 09-05-2008
use dos prompt
go to start >run>cmd
then cd desktop
then ftp <server ip>>
username=ur login id on that server
>pwd=ur password of that server
then
>cd particular directory
then
>mget filename
>bye
# 5  
Old 09-05-2008
FTPSERVER="YOUR_WINDOWS_IP"
FTPLOGIN="YOUR_WINDOWS_USERNAME"
FTPPASS="YOUR_WIN_PASSWORD"
FTPDIR="YOUR_DEST_DIR"
FILE="FILENAME_TO_FTP"

ftp -n -i $FTPSERVER <<EOF
user $FTPLOGIN $FTPPASS
cd $FTPDIR
put $FILE
quit
EOF


instead of put you can use the mput for multiple files.
# 6  
Old 09-05-2008
i did it like this but it getting stuck

FTPSERVER="100.48.143.13"
FTPLOGIN="nali"
FTPPASS="sun1123"
FTPDIR="class"
FILE="file1.txt"

ftp -n -i $FTPSERVER <<EOF
user $FTPLOGIN $FTPPASS
cd $FTPDIR
put $FILE
quit
EOF

--------------------------------------------------------------------------

what to do
# 7  
Old 09-05-2008
Quote:
Originally Posted by ali560045
i did it like this but it getting stuck

FTPSERVER="100.48.143.13"
FTPLOGIN="nali"
FTPPASS="sun1123"
FTPDIR="class"
FILE="file1.txt"

ftp -n -i $FTPSERVER <<EOF
user $FTPLOGIN $FTPPASS
cd $FTPDIR
put $FILE
quit
EOF

--------------------------------------------------------------------------

what to do
################# FTP #############################

USER_LOG='/u01/UAT/scripts/scriptslog/in_ftp_pushing.log'
`touch $USER_LOG`
REMOTESERVER=97.253.17.142 # Your Remote IP
REMOTEPATH='/u01/app/ITOPS' # Give the Full path
LOGIN='it_dwh' # Your Login Name
PASSWORD='it_dwh' # Your Login Pwd
cd $LOCALDIR
ftp -n $REMOTESERVER << INPUT_END
quote USER $LOGIN
quote PASS $PASSWORD
hash
bin
cd $REMOTEPATH
prompt off
mput *.osa.gz # Add your file1.txt
bye
INPUT_END
if [ $? -ne 0 ]
then
echo "Error in the FTP file moving. on `date` " >> $USER_LOG
echo "The OUT_STATUS is: $?" >> $USER_LOG
else
echo "The FTP file is moved successfully.." >> $USER_LOG
echo "The OUT_STATUS is: $?" >> $USER_LOG
fi
################################################

Regards
Mr.Hanuma
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

Hi, Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting? If so what command i need to use. thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies

2. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

Hi, I am new to this subject.....Can someone please help me out with the script... unix usernm "sdhftst" unix pwd "chsd13" windows usernm "dfghtst" windows pwd "chsd13" path..../xxx/xxxxx/xxxxxx/xxxxxxx please can u get me a script...its only one file to get ftp. Thanks... (2 Replies)
Discussion started by: himakiran9
2 Replies

3. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

4. Windows & DOS: Issues & Discussions

UNIX to WINDOWS FTP

Hi gurus, I need to FTP files from a UNIX box to a WINDOWS server. FTP is running on the WINDOWS server. I am able to log in to the WINDOWS machine with FTP, however when i do a dir in the ftp prompt i get the following 200 PORT command successful. 150 Opening ASCII mode data connection for... (3 Replies)
Discussion started by: ladarlsan
3 Replies

5. Shell Programming and Scripting

FTP from Windows to UNIX

will this work, knowing that the file is in a directory in windows.. It is going from a drirectory in windoxs to UNIX \ # Error Handling Function function ErrorHandle { # if type is 1, then the file does not exist or unreadable if then echo "File... (5 Replies)
Discussion started by: rechever
5 Replies

6. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

7. UNIX for Dummies Questions & Answers

Windows to UNIX FTP

Good Morning, I am currently having a setup of running a batch file in windows to ftp certain files to unix and after that one i login to a unix box to manually run a script to clean up those files and combine them into one and get go back to windows to run another batch of file to get the... (4 Replies)
Discussion started by: ryan_estiya
4 Replies

8. UNIX for Dummies Questions & Answers

FTP from unix to Windows

Hi, I know that there should be a FTP server in Windows or a FTP listener daemon running in windows. Iam a beginner. May I know, what setup need to be done on Windows/unix end so that, a file can be transferred using sftp/scp from unix to windows. Thanks in Advance. (2 Replies)
Discussion started by: deepakwins
2 Replies

9. UNIX for Dummies Questions & Answers

FTP from windows to unix

Hi all, How to FTP an excel format file located in windows to unix using shell script.Any particular commands we have to use? Thanks& Regards, rrs (4 Replies)
Discussion started by: rrs
4 Replies

10. UNIX for Dummies Questions & Answers

ftp from unix to windows

Hi, I have been using ftp to transfer files back and forth between windows and unix machines. But everytime i started the ftp session from the windows machine. I have a question why I am not able to connect to the same windows machine from the same unix machine. How do I do this? ... (11 Replies)
Discussion started by: oldtrash
11 Replies
Login or Register to Ask a Question