why can’t you change a file name while said file is open?


why can’t you change a file name while said file is open?

In: Technology

You can, but the program that currently has the file open has to do it. Things go wrong when multiple programs try to read and write from the same file at the same time. If you rename the file, and try to save your work in a program that had the file open when you renamed it, it would probably create a new file with the old name. Easiest way to deal with this issue is to only let one program open the file at a time.

For more information, search for “lock contention”.

Firstly, this “limitation” is bound to Windows. Windows deeply identifies files by their path and name, the Mac operating system using a geekier Identifier for the file, so the name is more of a piece of metadata that is important to users, but not to the bowels of software.

Sos..if you were to rename the file an open application that went to save said open file would either freak out because it wasn’t there, or more likely create a new file. Because that would be an unusual behavior, the action is prevented.

Other Questions You Might Be Interested In: