How can I check directory for locked files?
How can I recursively check if a directory contains write-locked files (running .exe or .dll)?
I'm writing an updater that simply replaces old filed with new ones and before starting the update process I want to check if it is safe. Without this check I may end up with half-updated application (some dll updates may succeed before I encounter running exe and than user may close the updater) which will be unusable.