Check File Exists and compare to previous day file script

We have data files that are ftp'd every morning to a SUN server. The file names are exactly the same except for that each has the date included in its name. I have to write script to do 2 things:

STEP 1) Verify that the file arrived in morning.
STEP 2) Compare the file size of the current days file to the previous days file. If the current days file size is 30% smaller or less then the previous days, I will need to write a flag/indicator to a log file. (NOTE: The sizes should be very close in size every day, so any decrease to 30% or less would indicate it is missing data.)

Any assistance you can provide is appreciated.

What have you written so far to get started?

To locate the files that have arrived in the morning I am using:

find /<path> -type f -name "eon*.tar.Z" -mtime -1

The part I am not sure about is how to determine if the new file is 30% or less in size compared to the previous days file.

Thanks.

You can determine the filesize with something like:
> ls -l | tr -s " " | cut -d" " -f5

You can learn the filename for the day before with something like:
>find * -mtime -2 -mtime +1

And you are left to combine the logic of the two:
>tfile=$(find /<path> -type f -name "eon*.tar.Z" -mtime -1)
>yfile=$(find /<path> -type f -name "eon*.tar.Z" -mtime -2 -mtime +1)
>tsize=$(ls -l "$tfile" | tr -s " " | cut -d" " -f5)
>ysize=$(ls -l "$yfile" | tr -s " " | cut -d" " -f5)

[I think I have all of that syntax correct :\) ]

Now, do your math with $tsize for today's file and $ysize for yesterday.
And execute whatever corrective actions are needed.