Hi All,
I have to ftp a file from a server to other server(which is mainframes). I have script which is written already and used for other ftp's.
----------------------------------------------------
Here is the script:
----------------------------
remote_server="${1}"
remote_user="${2}"
remote_passwd="${3}"
remote_path="${4}"
remote_file="${5}"
local_path="${6}"
local_file="${7}"
log_path="${8}"
ftp -v -n $remote_server << eof >> $log_path/$local_file.log
user "$remote_user" "$remote_passwd"
lcd $local_path
cd $remote_path
prompt
put $local_file $remote_file
eof
------------------------------------------------
Values of the variables are passed through other processes
=============================================
remote_server="greta"
remote_user="group"
remote_passwd="apple"
remote_path=
remote_file="12345"
local_path="/usr/fact/rin/"
local_file="abcd.txt"
log_path="/usr/fact/log"
=================================================
This script looks good and works fine. But my problem is I am not able to ftp a file.It shows me the error:
abcd.txt: A file or directory in the path name does not exist
where I am able to ftp a file manually to this particular server. Any kind help is greatfull.
Thank you...
I have to ftp a file from a server to other server(which is mainframes). I have script which is written already and used for other ftp's.
----------------------------------------------------
Here is the script:
----------------------------
remote_server="${1}"
remote_user="${2}"
remote_passwd="${3}"
remote_path="${4}"
remote_file="${5}"
local_path="${6}"
local_file="${7}"
log_path="${8}"
ftp -v -n $remote_server << eof >> $log_path/$local_file.log
user "$remote_user" "$remote_passwd"
lcd $local_path
cd $remote_path
prompt
put $local_file $remote_file
eof
------------------------------------------------
Values of the variables are passed through other processes
=============================================
remote_server="greta"
remote_user="group"
remote_passwd="apple"
remote_path=
remote_file="12345"
local_path="/usr/fact/rin/"
local_file="abcd.txt"
log_path="/usr/fact/log"
=================================================
This script looks good and works fine. But my problem is I am not able to ftp a file.It shows me the error:
abcd.txt: A file or directory in the path name does not exist
where I am able to ftp a file manually to this particular server. Any kind help is greatfull.
Thank you...