Hi all

can anyone please help me write a shell script for file transfer from windows to unix server and vice versa. i m new to unix shell scripting so kindly bare with the small mistakes tht i mite have made

the code is:

#!/bin/sh

filename="sample.txt"
user='user'
password='passwd'
IP='some ip'

ftp -n -i -v $IP 22 <<-END_SCRIPT > LOG_file
user $user $password
status
bin
get $filename
bye
END_SCRIPT

thanks in advance

Recommended Answers

All 2 Replies

So does it work?

What do you see in LOG_File?

Have you looked at the -d option of the FTP command?

Are there any diagnostics in your firewall (about trying to use a particular port)?

So does it work?

What do you see in LOG_File?

Have you looked at the -d option of the FTP command?

Are there any diagnostics in your firewall (about trying to use a particular port)?

i dont see anything in the log file, its 0 byte. i guess i m missing set up issues. may be in windows i need to enable FTP through IIS. could you please tell me those? what are the steps needed in windows side and unix side to transfer files between them. thank u

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.