I have a file like this 07200900.SUP,in a windows directory I need to FTP this file to UNIX , the directory in unix is N:\orgs\Financial Aid\MIIS\0910\FTP
I am getting this error
miis_ftp.ELM_SUP.shl[30]: =cd orgs/"Financial Aid"/"MIIS"/"0910"/"FTP" : not found
IN THE LOG FILE
Activities for Mon Jul 20 16:44:05 EDT 2009:
File 07200900.SUP does not exist or unreadable
End of activities
#MPATH="/u02/sct/banner/banpntr";
MPATH=$BANNER_HOME;
JOBNUM=$ONE_UP;
USER=$BANUID;
LPATH="/u02/sct/banjobs/";
$CDRemoteDir='cd orgs/"Financial Aid"/"MIIS"/"0910"/"FTP" ';
ScriptName="miis_ftp.ELM_SUP.shl";
UpLoadFileName=`date "+%m%d%y"00.SUP`;
##NewName= "eluppdtop.dat" ;
RemoteHost="middfiles.XXXXX.edu";
### look at this
RemoteUser="XXXXXX_finaid";
RemotePass="XXXXX";
###CDRemoteDir= "/u02/sct/banjobs";
TMode="ascii"; # Transfer mode
EmailAddress="XXXXX@XXXXXX.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 $UpLoadFileName
# End ftp session
echo quit
) | ftp -vin $RemoteHost >> $LogFile
# End of FTP Process
#========================================================================#