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