Originally posted by: GobinathP
Dear All,
I have the script to copy files from windows server to AIX. Please find the below script
#!/bin/ksh
HOST='192.168.0.74' //Windows server ip
USER='user' //windows server username
PASS='password' // windows server password
SAVEDATE=`date +%m%d%H%M`
SAVEDIRKEEP="/local/temp/interface/${SAVEDATE}/"
set -x
! -d ${SAVEDIRKEEP} && mkdir -p ${SAVEDIRKEEP} //creating a directory with month,date and timestamp
chmod -R 777 ${SAVEDIRKEEP}
chown -R decadm:sapsys ${SAVEDIRKEEP}
ftp -n ${HOST} <<END_SCRIPT
quote USER ${USER}
quote PASS ${PASS}
cd SAPOPS
mget *.txt /local/temp/interface/${SAVEDATE}/ \\this is location to copy the files from windows servers
bye
END_SCRIPT
exit 0
I want to copy the files from windows server (location: D:/users/olam/SAPOPS) to AIX server (/local/temp/interface/${SAVEDATE}/). When i am running the above script the files are copying to only /local/temp/interface/ location. i am not able to copy into /local/temp/interface/${SAVEDATE}/ location.
Can anyone help me?
Thanks in Advance.