A
arthernan
About 3 years ago I did a HotFolder service that would scan
directory for files and once they appeared it would run programs
passing along the path of each particular file.
At first I tried to use the FileSystemWatcher object available in
dotNet. After a lot of painful research I found out that
FileSystemWatcher is a dotNet interface to an operating system
function. This function uses a buffer that sometimes would get
overriden and files would be missed. The only other alternative was a
logging mechanism also part of windows that was meant for Backup
programs. This mechanism was fairly complicated (not meant for IS
programming). So my boss told me to just scan the folders every X
seconds.
This HotFolder service has become so popular that now scanning the
folder is not a good option anymore. I catch all the files appearing in
the folder but sometimes an incoming file will overwrite a previous
file before the HotFolder service can put a lock on it.
And since it's been three years I thought to check again to see if
microsoft had fixed this problem. Or if they made the logging mechanism
easier to use.
Arturo Hernandez
directory for files and once they appeared it would run programs
passing along the path of each particular file.
At first I tried to use the FileSystemWatcher object available in
dotNet. After a lot of painful research I found out that
FileSystemWatcher is a dotNet interface to an operating system
function. This function uses a buffer that sometimes would get
overriden and files would be missed. The only other alternative was a
logging mechanism also part of windows that was meant for Backup
programs. This mechanism was fairly complicated (not meant for IS
programming). So my boss told me to just scan the folders every X
seconds.
This HotFolder service has become so popular that now scanning the
folder is not a good option anymore. I catch all the files appearing in
the folder but sometimes an incoming file will overwrite a previous
file before the HotFolder service can put a lock on it.
And since it's been three years I thought to check again to see if
microsoft had fixed this problem. Or if they made the logging mechanism
easier to use.
Arturo Hernandez