file does not exist or unreadable in an FTP script

I will appreciate any help with this...
I have a file in this directory that looks like: this
07210900.SUP, I am getting the following error:

Activities for Tue Jul 21 07:29:14 EDT 2009:
File 07210900.SUP does not exist or unreadable
End of activities

The idea is to capture the file in the CDRemoteDir then change the name
to a new name and then ftp to a unix directory.
the XXXX is me changing some code (security reasons)

CDRemoteDir='cd orgs/"Financial Aid"/"MIIS"/"0910"/"FTP" ';
ScriptName="miis_ftp.ELM_SUP.shl";
UpLoadFileName=`date "+%m%d%y"00.SUP`;
NewName= "eluppdtop.dat" ;

Here is the all script

MPATH=$BANNER_HOME;
JOBNUM=$ONE_UP;
USER=$BANUID;
LPATH="/u02/sct/banjobs/";
RemoteHost="files.xxxxxxx.edu";
### look at this
RemoteUser="xxxx_xxxxx";
RemotePass="xxxxxxx";
 
CDRemoteDir='cd orgs/"Financial Aid"/"MIIS"/"0910"/"FTP" ';
ScriptName="miis_ftp.ELM_SUP.shl";
UpLoadFileName=`date "+%m%d%y"00.SUP`;
NewName= "eluppdtop.dat" ;
 
TMode="ascii"; # Transfer mode
EmailAddress="xxxxxxi@hhhhhh.edu";
LogFileName="miis_ftp.ELM_SUP_${USER}_${JOBNUM}.log";
LogFile="${LPATH}${LogFileName}";
TodayDate=`date`;
echo "\nActivities for "$TodayDate":" >> $LogFile;
#========================================================================#
# Error Handling Function
function ErrorHandle
{
# if type is 1, then the file does not exist or unreadable
if [ $type -eq 1 ]
then
echo "File "$UpLoadFileName" does not exist or unreadable" >> $LogFile;
echo "Subject: Error in Running Script\n Error in uploading file script "$ScriptName". File "$UpLoadFileName" does not exist or unreadable" > EmailMessage;
sendmail -F " File Upload" $EmailAddress < EmailMessage;
rm EmailMessage;
fi
# if type is 2, then the file has zero size
if [ $type -eq 2 ]
then
echo "File "$UpLoadFileName" has a zero size value" >>$LogFile;
echo " Subject: Error in Running Script\n Error in uploading file script "$ScriptName". File "$UpLoadFileName" has a zero size value" > EmailMessage;
sendmail -F "The eluppdtop.dat File Upload" $EmailAddress < EmailMessage;
rm EmailMessage;
fi
echo "End of activities\n" >> $LogFile
# Exit the program since error occurred
exit 1;
}
#========================================================================#
# Change the directory to one contains the file to be transported
##cd $LocalDir;
cd $CDRemoteDir;
# Do an -r command on the desired file ensure that the file exist and readable
if [ ! -r $UpLoadFileName ]
then
type="1";
ErrorHandle;
fi
# Do an -s command on the desired file ensure that the file exist
# and is not null
if [ ! -s $UpLoadFileName ]
then
type="2";
ErrorHandle;
fi
 
#========================================================================#
# Initiate the FTP process
# Loop through remaining parameters to create ftp commands.
(
# Enter user-name and password in host machine
echo "user $RemoteUser $RemotePass"
# Set transfer mode
echo $TMode
# Change directory in host machine
echo ${CDRemoteDir}
# Change local directory in local machine
echo lcd $LocalDir
# Transfer original file name
echo put $NewName
# End ftp session
echo quit
) | ftp -vin $RemoteHost >> $LogFile
# End of FTP Process

#========================================================================#

Double posting not allowed, read the forum rules!

Thread closed continue here: