|LateNightHacking Projects 2001||Auth|
2001-01-29 : The QA team in the White Plains office of Knight Financial Products used NT network shares to hold the latest build of our product. When we wanted to do a new build, we would move the old build to an archive and create a new build in the original location. We had a persistent problem with people (or programs, especially Win Explorer) acquiring locks on file and folders that we needed to move. This would prevent us from moving the build until we could chase down and kill the process with the lock.
net file command can be used to force closed a file, but it's not really
usable because it requires that you specifiy the file number and it can only close one file at
I checked the network file sharing APIs and saw no reason why I couldn't write a little
tool to do the same thing only better. Following the grand MSFT tradition of adding
Ex to the extended version of an API, I present
netfilex [-srv <\\server>] [-path
] [-close] [-force] [-full] Enumerate all the files open on a server. -srv - specify server to connect to; defaults to local computer. -path - only show files beginning with this path prefix. -close - close all matching files. -force - don't ask before closing. -full - display full details about each file.
You can get the source via anonymous CVS at
cvs -d :pserver:firstname.lastname@example.org:/code-cvsroot co 2001/netfilex
|Louis K. Thomas <loui sth@hotm ail.co m>||Auth||2002-07-14 (5364 days ago)|