Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to transfer files via ftp and error out a concurrent program if the ftp is not conncted in oracl

MDRNov 14 2014 — edited Nov 14 2014

Hi,

I wrote a peice of shell script to trasfer files via ftp but if the ftp fails to connect i need to error out the concurrent program can anyone give the peice code for this requirement

my code:

#LOCALDIR=/tmp

REMOTESERVER=198.140.146.14

#REMOTEPATH=/inbound

#LOGIN=genpak

#PASSWORD=e3cltvEAdO

cd /tmp

#find . -type f -mtime 0

for i in *

do

if [ -s $i ]; then

echo "$i is a file and size is greater than zero."

else

echo "$i is an empty file and deleting now..."

rm -rf $i

fi

done;

echo $1 $2 $3

#if [! -f $REMOTESERVER   ]

#then

#echo “Entered Exception”

#exit 1

#else

#exit 0

#fi

ftp -n $REMOTESERVER<<INPUT_END

prompt off

quote user resonance

quote pass resonance

prompt off

cd /orap/01/app/resonance/dinesh

mput *.*

quit

INPUT_END;

please let me know the anser as soon as possible

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2014
Added on Nov 14 2014
3 comments
1,503 views