PROGRAMMATICALLY TRANSFERRING FILES USING Oracle MFT
Hello,
We have a bunch of shell scripts that programmatically calls traditional SFTP through spawn to manage inbound/outbound files. Example of one such shell scripts is given below.
Now, we need to retire traditional SFTP and modify these shell scripts to use MFT instead. How do I achieve that ? Is there a documentation or note somewhere that guides through scripting MFTP commands equivalent of SFTP which we can use to modify such shell scripts?
We have a bunch of shell scripts that programmatically calls traditional SFTP through spawn to manage inbound/outbound files. Example of one such shell scripts is given below.
Now, we need to retire traditional SFTP and modify these shell scripts to use MFT instead. How do I achieve that ? Is there a documentation or note somewhere that guides through scripting MFTP commands equivalent of SFTP which we can use to modify such shell scripts?
archvar=`date +%Y%m%d%H%M` servername=$1 user=$2 pass=$3 sourdir=$4 destdir=$5 encript=${6:-N} filelist=${7:-*`date -d "-1 day" +%Y%m%d`*.*} workdir=${destdir}/inbound archdir=${destdir}/archive archlog=${destdir}/log/ftp_${archvar}.log #ftpcmdlog=${destdir}/log/ftpcmd_$$.log #ftpcmd=${destdir}/log/ftpcmd_$$.batch ftpcmdlog=$APPLPTMP/ftpcmd_$$.log ftpcmd=$APPLPTMP/ftpcmd_$$.batch #keydir=/home/pgpadmin/.keys #keydir=~/.keys exit_status=0 # # Script Functions # #echo "$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11" echo "archvar:$archvar" echo "servername:$servername" echo "user:$user" #echo "pass:$pass" echo "destdir:$destdir" echo "sourdir:$sourdir" echo "workdir:$workdir" echo "archdir:$archdir" echo "archlog:$archlog" echo "ftpcmd :$ftpcmd" echo "FileList: $filelist" if [ "$destdir" = '' ]; then echo "Destination File Directory should not be blank in FTP setup" exit_status=1 fi # echo directory: ${workdir} if [ -d ${workdir} ]; then echo "Valid Directory" cd ${workdir} else echo "InValid Directory" exit 1 fi #-------------------- # Invoke FTP command #------------------- fn_list () { ls ${filelist} } FTP_INIT() { cat
0