copy_file{
for file in \MyDrive\MyFolder\
do
echo $file
FILESIZE=$(stat -c%s $file)
echo "filesize " $FILESIZE
if [[ "$FILESIZE" -eq 0 ]]
then
echo "$file is empty.Hence not sending it.Can't Execute further"
exit 1
else
echo "$FILE has data."
fi
echo "Copying File "
cp $file $Other_Directory
}
#************Starting Copy File String#
copy_file
for file in \MyDrive\MyFolder\
do
echo $file
FILESIZE=$(stat -c%s $file)
echo "filesize " $FILESIZE
if [[ "$FILESIZE" -eq 0 ]]
then
echo "$file is empty.Hence not sending it.Can't Execute further"
exit 1
else
echo "$FILE has data."
fi
echo "Copying File "
cp $file $Other_Directory
}
#************Starting Copy File String#
copy_file
Comments
Post a Comment