Author: ChrisSOTM | Posted on: 9/3/2009 1:26:45 PM | Views : 341

Hi,
I have created a windows service which has to retrieve dymo print lables through ftp. The timer is set to run every 5 seconds. The files are accesed and downloaded using FtpWebResponse, FileStream etc then saved locally and then deleted from the server. Once all this has been done the files are send to the dymo to be printed and then deleted locally.
The problem I have is that since the service runs every 5 seconds the response returns a 550 error, so the file is unavailable for download and delete. I have sort of hacked this and stuck the code in a try catch statement. However I would prefer to some how not enter the function retrieving the files until it has finished its current job. I looked at threading but the same problem occurs as it is still looking at the same files.
Can anyone suggest a tidy way of a work around or a way I can check skip any unavailable files?



thanks in advance
Chris

...

Go to the complete details ...