FTP using SFU

I'm trying to ftp a file from Solaris to Windows XP Pro using SFU and the command that I used is as follows:

ftp -n �host� << cmd
user �loginname� �password�
cd Directory
ls filename error
bye
cmd

If the filename does not exist, it shows the following output:

Output to local-file: error? n, y, p, a, are the only acceptable commands!
Output to local-file: error?

Could you tell me what's wrong with my script above.

If you supply two arguments to ls, the second one is the local filename to store the output. From man ftp...

    ls [remote-directory] [local-file]
                 Print a listing of the contents of a directory on the remote
                 machine.  The listing includes any system-dependent informa-
                 tion that the server chooses to include; for example, most
                 UNIX systems will produce output from the command 'ls -l'.
                 (See also nlist.)  If remote-directory is left unspecified,
                 the current working directory is used.  If interactive
                 prompting is on, ftp will prompt the user to verify that the
                 last argument is indeed the target local file for receiving
                 ls output.  If no local file is specified, or if local-file
                 is '-', the output is sent to the terminal.

My ftp script works from Unix to Unix Box but not from Unix to using SFU. Anyway, is there a better way so as not to show an error in SFU if a file does not exist?