| | | Forum Newbie
       
Group: Forum Members Last Login: 1/6/2006 3:04:00 PM Posts: 2, Visits: 1 |
| | I'm writing some code that goes out every few minutes and downloads all files with a specified generic name from an FTP site. It's part of a Windows service. Since the toolkit doesn't support generic names, I do a WsftpConnection.GetFolder to get the list, then download and delete each file in the folder. The first time it works exactly as expected. (This is just ordinary FTP for now, not secured.) A few minutes later, I go to get the directory listing again - and it shows all the old files which aren't there any more, but not the new ones. Using the SessionLog event to trace things, I see that the directory is cached somewhere. That's fatal. Can I disable the cache, set the cache duration to less than the polling interval, or tell the object not to use the cache? Or is there some other way to do this? If not, how long is the cache kept for? (I might be able to use a longer polling interval.) Any ideas would be appreciated. |
| | | | Time Traveler
       
Group: Ipswitch Employees Last Login: Today @ 4:27:41 PM Posts: 228, Visits: 1,379 |
| You can use the Refresh method on the folder to update it. Claudio Robles WS_FTP Team Ipswitch |
| |
|
|