04-04-2023, 12:55 AM
This is for historical reasons. On Unix, and on MS-DOS beginning in v2, a directory is actually a file which only has information about other files. Therefore "renaming" a file inside a directory a child of the "root", to the computer is like changing a word in a text file. The "root" directory, however, was handled quite differently at least in MS-DOS; it had a limited number of entries stored directly into the FAT or something like that.
It would have been irritating if M$ came up with "NAME" for QuickBASIC/BASIC PDS and it wasn't possible to move a file from one child directory to another, and instead had to copy to destination, verify destination and then delete source. Programmers would have insisted on the quirk which really isn't.
It would have been irritating if M$ came up with "NAME" for QuickBASIC/BASIC PDS and it wasn't possible to move a file from one child directory to another, and instead had to copy to destination, verify destination and then delete source. Programmers would have insisted on the quirk which really isn't.