NetFileX

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.

The 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 a time.

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.

Usage:

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:anon@www.latenighthacking.com:/code-cvsroot co 2001/netfilex
    C o m m e n t s :    
    (nothing yet)
    Edit