for FILE in `find /home/Upload/*`
Need to use a while instead to prevent errors when the file is emptied
for FILE in `find /home/Upload/*`
Need to use a while instead to prevent errors when the file is emptied
find /home/Upload/* | while read str
do
....
done
find /home/Upload/* | while read str
do
....
done
I see the error of my ways
Thanks
ls /home/Upload/* > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "There are no files present."
else
for FILE in `find /home/Upload/*`
do
...........
done
fi