GetLastAccessTime... FSW

I am using the FileSystemWatcher Object in VB.NET to watch a data input directory. When the FSW raises a Created or Changed event I start a timer if it is not already started. At each interval in the timer I check to see if the LastAccessTime of the input directory was more than a set time period has elapsed (lets just say ten seconds). If it is I stop the loop and process the data.

This works great if only files are put in the input directory. However, I would like the input directory to support directory structures also. Currently if a directory structure is input the 'LastAccessTime' will refer only to the top level in that directory structure and not to any sub directories. (iknow this is getting long sry)

Is there way to get the last access time for any file of sub directory in my Input folder without iterating through everything and getting the AccessTime for each object, and determining which was the latest ?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!