Unix script to MOVE via FTP a directory

Good afternoon!
I need to move a bunch of files from an FTP site to my server.
However mget *, dele * will not suffice as I cannot guarantee that new files are not uploaded between commands.
Roughly, this is what I would like to do:

 
(using a .netrc)
ftp somehost
bin
prompt
cd some_folder
ls > LIST_OF_FILES
bye
For each $FILE_1 in LIST_OF_FILES
ftp somehost
prompt
bin
cd some_folder
get $FILE_1
bye
crccheck $FILE_1 // (the filename is file_CRC#.txt) This can be done later.. 
ftp somehost
prompt
cd some_folder
dele $FILE_1
bye
end for each

My problems are:
1)when running ls > files.lst in my csh script, files.lst is always empty, for whatever reason the output is not making it in a file, if I run an ls without the >, I do see 20 files.
2) when I have my files.lst, I need help with an awk/sed etc loop
Thank you so much for your help / ideas.
Derek

The syntax for ftp commands is not the same as that for ftp commands. You will need to remove the ">" from the command line. See "man ftp" options "ls" or "dir" for the syntax of the ftp directory list command on your target Operating System. The format of the output from a ftp directory list is variable and you may need further shell code to extract the filenames.

ls LIST_OF_FILES