Article 5ENF7 check for a file then lftp a different file to a directory

check for a file then lftp a different file to a directory

by
lmu9@yahoo.com
from LinuxQuestions.org on (#5ENF7)
This is for an Oracle E-business concurrent request. The request uses a file on the file system to lftp receipts to archive. It runs every 5 minutes to check for the file. If the file is not there, it should do nothing or say file is not there.

Process needs to check for 2 files, an *.ack file and an *.xml file in a directory. When the xml file is there, then move the ack file.

This code checks for a file, but i need to check for both files the *.ack file and *.xml file. When both are there move the ack file to archive.

if [ "$(ls -A $lclDirOut/*.*)" ]; then
echo "Files found in $lclDirOut"
cd $lclDirOut
chmod 777 *
lftp <<EOP
open $rserver
user $touser $topwd
echo "Copying files to Remote Server $vORacleFiles"
lcd $lclDirOut
mput *.*
bye
EOP
else
echo "No files found in $lclDirOut."
fi

Thank you for the help.latest?d=yIl2AUoC8zA latest?i=tbCUduZdiWA:AfvVXqI1OQs:F7zBnMy latest?i=tbCUduZdiWA:AfvVXqI1OQs:V_sGLiP latest?d=qj6IDK7rITs latest?i=tbCUduZdiWA:AfvVXqI1OQs:gIN9vFwtbCUduZdiWA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments