Quick Answer
Run net use * /delete in an admin command prompt. If that fails, use openfiles /disconnect /id * to kill all open remote files, then disconnect again.
What's Actually Happening Here
You're trying to unmap a network drive or close a shared folder connection, and Windows throws the 0X00000961 error. The message says there are open files on that connection. This is real—I've seen it dozens of times. Usually it's a Word doc someone left open overnight, or a PDF that's still cached in Explorer. The network connection refuses to close because the system thinks files are in use. This can also happen if you have a mapped drive that you disconnected from the server side, and Windows is holding a ghost connection.
Had a client last month whose entire print queue died because of this. She had a mapped drive to a server folder with printer drivers, and when IT tried to update the share, they couldn't disconnect the old one. The error kept popping up. Took me 15 minutes to sort it out with the right command.
The real fix is to force the system to let go. You have two options: use the command line to disconnect everything at once, or find and close the specific open file handle. Let's start with the easy one.
Fix Steps – Do This First
- Open an admin Command Prompt. Press Windows key, type "cmd", right-click "Command Prompt", and choose "Run as administrator". Yes, you need admin rights for this.
- List your network connections. Type
net useand hit Enter. You'll see a list of all mapped drives and their status. Look for the one giving you trouble. - Force delete all connections. Type
net use * /deleteand press Enter. The asterisk means all connections. It'll ask you to confirm for each one. Type Y for yes. If it still gives you the 0X00000961 error, move to step 4. - Close all open remote files. Run
openfiles /disconnect /id *. This command tells Windows to disconnect all open files on remote shares. It doesn't ask for confirmation, so be sure you're okay with closing everything. Then trynet use * /deleteagain. - Check if it worked. Run
net useagain. You should see something like "There are no entries in the list." If that's the case, you're good. Re-map the drive fresh from File Explorer.
If That Didn't Work – Alternative Fixes
Option 1: Close the specific file handle
Sometimes you don't want to kill all open files because you have other shares active. In that case, find what's holding the connection. Type openfiles /query to see a list of open files. Note the ID number of the file on the share you're trying to disconnect. Then run openfiles /disconnect /id [number] where [number] is that ID. Then try disconnecting the drive again.
Pro tip: If you can't tell which ID belongs to which share, try dismounting the drive first in Explorer (right-click the drive and choose Disconnect), then run the openfiles command. The drive will still show as disconnected, but the open file handle might linger.
Option 2: Reboot and try again
This is the lazy fix but it works. Save your work, restart Windows, and then try disconnecting the drive. A reboot clears all cached file handles. Only do this if you're in a hurry and don't want to mess with commands.
Option 3: Use the GUI to close open files
Open Computer Management (right-click This PC, choose Manage). Go to System Tools > Shared Folders > Open Files. You'll see a list of all files open from this computer on remote shares. Right-click the file that's causing trouble and choose "Close Open File". Then disconnect the drive from File Explorer.
Prevention Tip
This error happens most often when applications don't release file handles properly. To avoid it, always close files on network drives before you disconnect. If you use Office apps, save and close the document first. If you're using a database or accounting software, log out of the application before unmapping the drive. Also, set your network drive to disconnect on logoff if you can—it forces a clean shutdown. Go to the drive properties in File Explorer and uncheck "Reconnect at sign-in" if you don't need it every time. That way, the connection drops when you log off, and you won't get this error the next day.