How to get an exclusive process lock in a folder in Windows?

Is it possible to lock a directory in Windows to ensure that no other process reads or modifies files inside the directory for the duration of the lock, while at the same time allowing the locked process to change and move files and the directory freely?

+3
source share
1 answer

This is not a real answer, but as a workaround:

Move the directory to a subdirectory specific to your application located on the same volume.

Benefits:

  • Prevents users and other programs from changing the file in the same place, since the files will no longer be
  • , , , , "" ""

:

  • , ,
  • , , ( "Path not found" "Access denied" )
  • , ,
  • "" ( , , , ), , "" ""
0

All Articles