Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
100 views
in Technique[技术] by (71.8m points)

Releasing Windows file share locks

This problem crops up every now and then at work. Our build machine can have it's files accessed via a normal windows file share. If someone browses a folder remotely on the machine, and leaves the window open overnight, then the build fails (as it has done now). The explorer window left opened points at one of the sub folders in the source tree. The build deletes the source, and does a clean checkout before building. The delete is failing.

Right now, I'd like to get the build to work. I'm logged in from home, and I'd rather not reboot the build machine. I'm unable to get hold of the person whose machine is looking and the files, and I can't remotely reboot their machine.

When a windows share has a lock, the locking process is System, so I don't think I can kill it, as with normal locks.

Does anyone know a way to release the lock on a shared folder without having to reboot the machine?

question from:https://stackoverflow.com/questions/320128/releasing-windows-file-share-locks

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are admin on the server sharing the file over the network, you can use the Windows in-built feature:

  1. Start → My Computer → Right-click → Manage gets you to the Computer Management console
  2. In the left nav, navigate to Systems Tools → Shared Folders
  3. You can view Shares, Sessions & Open Files here. This allows you to find out who has opened which files from which workstations.
  4. Right-click on an item in the list to be able to remove the file lock.

Hope this helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...