Case Sensitivity in Windows 2000 Filenames?

O

orljustin

Hi,

I'm trying to check the existance of a file in Windows 2000 by opneing
am fstream and seeing if it is open.

However, it seems that the executable doesn't care about case.

ie, if I am checking on myfile.txt and MyFile.txt is in there, it will
return true. However, other programs do care about the case (myfile
and MyFile are different), which is why I need to do what I am doing.

Am I right on this or is there something I am missing? I'm not a code
expert - this is a tweak on an existing program.

Thanks!
 
V

Victor Bazarov

I'm trying to check the existance of a file in Windows 2000 by opneing
am fstream and seeing if it is open.

However, it seems that the executable doesn't care about case.

ie, if I am checking on myfile.txt and MyFile.txt is in there, it will
return true. However, other programs do care about the case (myfile
and MyFile are different), which is why I need to do what I am doing.

Am I right on this or is there something I am missing?

Are you right on WHAT? Windows 2000 file system is case-insensitive.
> I'm not a code
expert - this is a tweak on an existing program.

I am not sure, I'd have to see some code, but you probably are mixing up
concepts: case sensitivity of the language and case sensitivity of the
file system (operating system). The latter is off-topic here. You might
want to ask in comp.os.ms-windows.programmer.win32 about that.

V
 
M

Mike Smith

Hi,

I'm trying to check the existance of a file in Windows 2000 by opneing
am fstream and seeing if it is open.

However, it seems that the executable doesn't care about case.

ie, if I am checking on myfile.txt and MyFile.txt is in there, it will
return true. However, other programs do care about the case (myfile
and MyFile are different)

Well, those programs are doing it wrong. Windows filesystems are
case-insensitive. You can't even *have* myfile.txt and MyFile.TXT in
the same directory; Windows won't let you. The programs you've
encountered that are case-sensitive are most likely Unix ports that did
not take into account this Unix/Windows difference.
 
O

orljustin

Mike said:
Well, those programs are doing it wrong. Windows filesystems are
case-insensitive. You can't even *have* myfile.txt and MyFile.TXT in
the same directory; Windows won't let you. The programs you've
encountered that are case-sensitive are most likely Unix ports that did
not take into account this Unix/Windows difference.

Hi again,

Thanks. I am doing the work on a windows box, but the files get put on
and used on a Unix box. Thus, the concern about whether the correctly
cased file is in the directory. It's a long story, but it sounds like
I won't be able to do my case check.

oj
 
S

Steven T. Hatton

Victor said:
Are you right on WHAT? Windows 2000 file system is case-insensitive.

Yes, its off topic. But just to be clear, there is no such thing as a
Windows 200 file system. There's NTFS, and a couple versions of FAT. NTFS
is case sensitive, and that is the most common Windows 2000 file system.
 
S

Stephen Howe

Hi,

I'm trying to check the existance of a file in Windows 2000 by opneing
am fstream and seeing if it is open.

However, it seems that the executable doesn't care about case.

Windows is case-insensitive but case-retentive.
So opening files using fstream that differ in case only is opening the same
file.
But it is case-retentive in that if you can use rename() to change case and
Windows will remember.

Stephen Howe
 
A

Alf P. Steinbach

* Mike Smith:
* (e-mail address removed):

Well, those programs are doing it wrong. Windows filesystems are
case-insensitive. You can't even *have* myfile.txt and MyFile.TXT in
the same directory; Windows won't let you.

Sorry, that's incorrect.

But as Victor wrote elsewhere, that part of the question is off-topic in
this group.
 
J

Jack Klein

Yes, its off topic. But just to be clear, there is no such thing as a
Windows 200 file system. There's NTFS, and a couple versions of FAT. NTFS
is case sensitive, and that is the most common Windows 2000 file system.

Extremely off-topic, but NTFS is case preserving, and not at all case
sensitive. There is quite a difference.
 
S

Steven T. Hatton

Jack said:
Extremely off-topic, but NTFS is case preserving, and not at all case
sensitive. There is quite a difference.
Yes, that was already addressed in a previous post. I guess I forgot about
the idiosyncracies of NTFS in the 5 years since I stopped using it on a
regular basis.
 
A

Alf P. Steinbach

* Steven T. Hatton:
Yes, that was already addressed in a previous post. I guess I forgot about
the idiosyncracies of NTFS in the 5 years since I stopped using it on a
regular basis.

Sorry, that's incorrect (Posix 0.9 semantics supported since NT 3.5x), and
as Victor wrote, it's off-topic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top