Apparently, Windows 7 has some new functionality that had historically required additional software (apparently, something called Unlocker would do it, and there were others mentioned as well). Instead of just refusing to rename or move or delete (or whatever) a file and leaving you to click “Ok”, it’s actually going to tell you what application is using the file and therefore preventing your doing what you want to do. First of all, it’s about fucking time, but for MS, anything that makes file management any easier is a plus. Annoys the hell out of me when I go to move a photo or something, but can’t because I forgot it’s still open in Irfanview. Just move the goddamned thing like I told you! It doesn’t, though, and that’s a pain, especially when I can’t tell right away what’s got a lock on it, so this is a step in the right direction. (Not my image–I “liberated” it.) Apparently, this functionality “sort of” exists in Vista, but almost no one uses it, and attempting to move a file will invoke UAC, just to tell you…it can’t move the file because (whatever application) has locked it. If that’s the case, I can’t say I’m surprised no one uses it.

Like just about everything useful “under the hood”, MS is late to the party and is treating something as new when Linux (maybe BSD and MacOS as well…dunno) has had that functionality for years. I forgot last night that an episode of The Big Bang Theory (sniffle…I hope it wasn’t the final episode of the season!) was open in VLC, but it didn’t matter. I had already copied it to my external drive, so I didn’t need the copy on my desktop anymore. I chucked it in the Trash, and forgot entirely about VLC until I shut down hours later. Linux doesn’t care whether some application is using the file; it just does what you tell it to do. I had always half-wondered how, and now, I know. Thank you, Henry! I don’t know who you are, and I don’t really care, but I had always been a little curious as to why I can rename photos when they’re open, or move them, and why I can delete a video even if VLC is still running. Interesting!
It’s because a “file” and a “file name” are two completely and fundamentally different concepts. Unix allows the same file to have as many file names as you wish. The file simply keeps a reference counter to see how often it is referenced (by file names and by applications) and ceases to exist once this reference counter reaches zero.
Therefore, once an application has opened a file through one of its file names, it has a connection to the file (reference counter increases) and doesn’t care at all what happens to the file name after that. You can move/rename or delete any of the file names of an open file at will since the application doesn’t need the name anymore once the file is open.
I’ve heard that this is in principle the same under Windows, at least on a kernel level, but that this functionality has been intentionally crippled under the guise of backwards compatibility. E.g. in FAT a file does have exactly one file name and deleting the file is done by changing the file name to start with a special character.
P.S. Looking forward to ext4 in Jaunty…is it April yet? 😀
