Find and Remove file locks

by Wayne Maples [Published on 20 April 2004 / Last Updated on 20 April 2004]

To find open files, from the command line, issue net file command. Text similar to the following will print to the screen:
ID   Path                              User name     # Locks
------------------------------------------------------------
10   C:\images\desktop.gif             wmaples          0
18   C:\images\wayne.gif               wmaples          0
23   C:\apps\sharedpgm\config.txt      wmaples          1
28   C:\dept\its\wmaples\profile.txt   wmaples          0
The command completed successfully.
desktop.gif, wayne.gif, config.txt, and profile.txt are open files on the server. config.txt has a lock on it. It is not uncommon for a shared config file to get a stuck lock which prevents other users from starting the application. To delete the lock, issue command net file 23 /close. Notice you use ID number.

Featured Links