FTP from Windows to UNIX

will this work, knowing that the file is in a directory in windows.. It is
going from a drirectory in windoxs to UNIX \

# 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

Use CODE-tags when posting code, data or logs to enhance readability and preserve formatting like indention etc., ty.

Make clear what you intend to do. You mention FTP in the subject but then there is nothing about FTP in the script. Also it is not clear if you want to check something remote or locally and where this will run, in cygwin environment for example on windows side or on the unix side. Be more precise and clear.

Also there is missing a curled bracket to close the function.

The other thing is, why you just don't try it out?!

Here is the full script, this is going to run in UNIX
THE FILE is in WINDOWS
The file is in a directory in WINDOWS
LocalDir='cd orgs /"Financial Aid"/"MIIS"/"0910"/"FTP" ';
and I wanted to move it to
="/u02/sct/banjobs/
the XXXX I changed, I don't want this all over the internet

I am getting this error
miis_ftp.ELM_SUP.shl[34]: eluppdtop.dat: not found
miis_ftp.ELM_SUP.shl[45]: /u02/sct/banjobs: cannot execute
miis_ftp.ELM_SUP.shl[87]: cd: bad argument count

"miis_ftp.ELM_SUP.shl" 133 lines, 3606 characters 
#**************************************************************************
# Script:  miis_ftp.ELM_SUP.shl
#
# Author:   
# Date:    07/15/2009
#
# Purpose:
# This script initiates an FTP to transfer files are downloaded from ELM,named #  xxxxxx00.SUP to \u02\sct\dataload\finaid,
#
#
# Directory Location for script:
#       Script object locations is -- Database Home Dir/middlebury/shl
#
# Audit Trail:
# 07/16/2009   Change remote host & user/password for new DFS folder system.
#                         Set change directory command for new folder path.
#                         Change MPATH from hard-coded value to $BANNER_HOME
#                         Include header info
#
#**************************************************************************

MPATH=$BANNER_HOME;

JOBNUM=$ONE_UP;
USER=$BANUID;

LPATH="/u02/sct/banjobs/";



ScriptName="miis_ftp.ELM_SUP.shl";
UpLoadFileName=`date "+%m%d%y"00.SUP`;
NewName= "eluppdtop.dat" ;

LocalDir='cd orgs /"Financial Aid"/"MIIS"/"0910"/"FTP" ';
CopyLocalDir='cd orgs /"Financial Aid"/"MIIS"/"0910"/"FTP" ';


RemoteHost="middfiles.middlebury.edu";
### look at this
RemoteUser="xxxxxxx";
RemotePass="xxxxx";

CDRemoteDir= "/u02/sct/banjobs";

TMode="ascii"; # Transfer mode
EmailAddress="xxxxxx@xxxxx.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;

# 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
#========================================================================#

You have to use code tags. Seriously.
You don't have to use ; after every line if there is no command after.
In line 32 variable is defined incorrectly: remove extra space after "="!

I think (sorry) that script is poorly written with minimal BASH knowledge.

Cheers
Chris

To debug your script, turn debugging inside it with

set -x

on, and with

set +x

you can turn it off. So you will see the current values of your variables etc. while the script is being processed.

Good luck.

I still having problems with this
I am getting this error, I ask my DBA he gave me acceess to th folder, I don't get it

echo cd orgs/"Financial Aid"/"MIIS"/"0910"/"FTP"
+ echo lcd /u02/sct/dataload/finaid
+ echo put 07210900.SUP
+ echo quit
+ 1>> /u02/sct/banjobs/miis_ftp.ELM_SUP__.log
07210900.SUP: No such file or directory