help in shell scripting

I am downloading some files sequentially from a ftp server with the help of a shell script using wget.... sometimes it happens that a particular file is not uploaded at that time n will be uploaded after few minutes.....

AT present the script skips that file and proceed downloading rest files...
I want that it should wait or retry until that file is uploaded or is made available on the server... and then it should proceed further.... thanx

I would prefer to store the names of the files not available at this moment and continue trying at the end of the started download. Looping through this array of filenames and looking for file available on server. if last file looked up the same as the one on the actual index then maybe 'sleep 10'. another counter can stop the loop after too many tries.

i understand dat but i need help in writing a shell scripting for dat only....