Synchronize accessing a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have an application the users will run on their PCs simultaneously. The
users will move/delete some files under a share directory at server. But only
one user can do it at the same time. Is there any .net class can provide this
mechanism? (synchronize processes in different PCs)
Thanks.

Li
 
Hi Li,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to lock the files in a shared
directory when moving or deleting them. If there is any misunderstanding,
please feel free to let me know.

When files are being moved or deleted, they are automatically locked by the
windows file system. We needn't care about that. So I would like to confirm
whether you need to lock a single file or make only one of your client
program access to the files. If the latter one is true, I think you have to
create some file in the shared folder to be a marker, so the program will
check that to decide whether it can do the moving or deleting operation.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Li,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top