Windows 11 PowerToy now lets you find out which processes are using the file

Source: OSNews

Article note: Oh cool, "fuser" for NT. That's... actually surprising there wasn't a good integrated tool. The NT process/file tooling is generally quite nice, if historically hard to script. It made me look at the history of fuser, and that resulted in an hour digging down a dumb rabbit hole to conclude: fuser's history is ...special. Thread that got me started looking: https://www.mail-archive.com/austin-group-l%40opengroup.org/msg08606.html It is present in POSIX.1 (IEEE Std 1003.1-2001) ... but the POSIX compliant output is a ludicrous fucking disaster of intermixed stderr and stdout. https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/utilities/fuser.html : "The fuser utility shall write to standard output the process IDs of processes running on the local system that have one or more named files open. For block special devices, all processes using any file on that device are listed. The fuser utility shall write to standard error additional information about the named files indicating how the file is being used." It is not in IEEE Std 1003.2-1992. It was added to the single UNIX specification in SUSv2 Issue 5 (1997) which is how it ended up in POSIX. It was in the SVID from the beginning in 1985 ( http://www.bitsavers.org/pdf/att/unix/System_V_Release_1/301-926_UNIX_System_V_Release_1_Administators_Manual_Jun82.pdf ). The BSD lineage mostly seems to have declared it fugly and ignored it, FreeBSD didn't spring it until 9.0 in 2012 and NetBSD still doesn't have one - they suggest the "fstat" utility instead. MacOS sprung one in ~2007 to get UNIX03 certified. And the one shipped with most Linux systems is from psmisc not part of coreutils.

Microsoft’s PowerToys for Windows 11 and Windows 10 has been updated with a new feature called ‘File LockSmith’. So what exactly is File Locksmith? In technical terms, it is a Windows shell extension that lets you check which files are in use and by which processes.

Up until today, it was not possible to find out which particular process is using the file on Windows. While Task Manager lets you eliminate processes, it cannot tell you what’s using your files or preventing file transfer. In fact, File Explorer will block your attempts to delete a file or folder in use by a process or app.

I lost count of how many times Windows would just stubbornly refuse to delete a file or directory because it was in use by some process, while not telling me which damn process we’re dealing with. Isn’t it absolutely bananas that it’s 2022 and you have to download some shell extension to get this basic functionality?

This entry was posted in News. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *