Just curious.
Does anyone know why filenames/directories are case insensitive?
That really limits the number of name possibilities.
Did the early keyboards not have a Caps Lock key?
Andy
Does anyone know why filenames/directories are case insensitive?
That really limits the number of name possibilities.
Did the early keyboards not have a Caps Lock key?
Andy
I'd like to flip the coin: why should they be case sensitive?
I haven't been able to think of one good reason you might want case insensitivity on path names, but it can cause a lot of headaches.
I haven't been able to think of one good reason you might want case insensitivity on path names, but it can cause a lot of headaches.
There are no decent reasons for case sensitivity and case INsensitivity is somewhat more idiot-resistant. Maybe that's why.
File names under Windows can be case-sensitive, just follow the following rules:
1. REG_DWORD ObCaseInsensitive in "\CurrentControlSet\Control\Session Manager\kernel" key must be zero
2. Use FILE_FLAG_POSIX_SEMANTICS flag in a call to CreateFile to enable posix rules.
When ObCaseInsensitive is 1 (default) on XP, you'll be unable to create blah.txt and BLAH.txt. After you change it to 0, you need to restart the system, to apply.
1. REG_DWORD ObCaseInsensitive in "\CurrentControlSet\Control\Session Manager\kernel" key must be zero
2. Use FILE_FLAG_POSIX_SEMANTICS flag in a call to CreateFile to enable posix rules.
When ObCaseInsensitive is 1 (default) on XP, you'll be unable to create blah.txt and BLAH.txt. After you change it to 0, you need to restart the system, to apply.
sapero: it's possible to do, but it's a really bad idea since you'll break just about any normal windows app that deals with filenames :)
File names under Windows can be case-sensitive, just follow the following rules:
1. REG_DWORD ObCaseInsensitive in "\CurrentControlSet\Control\Session Manager\kernel" key must be zero
2. Use FILE_FLAG_POSIX_SEMANTICS flag in a call to CreateFile to enable posix rules.
When ObCaseInsensitive is 1 (default) on XP, you'll be unable to create blah.txt and BLAH.txt. After you change it to 0, you need to restart the system, to apply.
Thanks sapero.
I want to make sure I understand this statement.
Does it mean that if I create a file using POSIX rules, then the file won't be accessable at all or only if it is not named exactly?
Thanks.
Access will occur according to POSIX rules. This includes allowing multiple files with names, differing only in case, for file systems that support that naming. Use care when using this option, because files created with this flag may not be accessible by applications that are written for MS-DOS or 16-bit Windows.
File names under Windows can be case-sensitive, just follow the following rules:
1. REG_DWORD ObCaseInsensitive in "\CurrentControlSet\Control\Session Manager\kernel" key must be zero
2. Use FILE_FLAG_POSIX_SEMANTICS flag in a call to CreateFile to enable posix rules.
When ObCaseInsensitive is 1 (default) on XP, you'll be unable to create blah.txt and BLAH.txt. After you change it to 0, you need to restart the system, to apply.
I changed the ObCaseInsensitive key.
I created two files with the same name except for a case change in the file name.
Had some wierd stuff occur like files with the same contents even though they should have been different.
Also, windows could not open one file and asked if I wanted to create a new one.
I went back to case insensitive. :-)
This is pretty much what f0dder said :)
I have created one with "asdf" and another with "qwert" (4 and 5 bytes). After deleting one with explorer, both were deleted. Hitting F3 (preview) in totalcommander - only the newest, with 5 bytes was opened. Same with notepad.
So I think, to work with such files, the user interface should use FILE_FLAG_POSIX_SEMANTICS flag with CreateFile, but noone uses it. This flag can be 'forced' easily by a plugin dll.
So I think, to work with such files, the user interface should use FILE_FLAG_POSIX_SEMANTICS flag with CreateFile, but noone uses it. This flag can be 'forced' easily by a plugin dll.
"Forcing stuff" and writing a dll changes this to way beyond a simple project.
I just got KMD and having a lot of fun with it.
Up till now, I thought there was no way to directly control the hardware in XP. :-)
I just got KMD and having a lot of fun with it.
Up till now, I thought there was no way to directly control the hardware in XP. :-)