By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,444 Members | 3,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,444 IT Pros & Developers. It's quick & easy.

Case Sensitivity in Windows 2000 Filenames?

P: n/a
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!

Jul 23 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
or*******@aol.com wrote:
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
Jul 23 '05 #2

P: n/a
or*******@aol.com wrote:
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.

--
Mike Smith
Jul 23 '05 #3

P: n/a


Mike Smith wrote:
or*******@aol.com wrote:
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.

--
Mike Smith


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

Jul 23 '05 #4

P: n/a
Victor Bazarov wrote:
or*******@aol.com wrote:
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.


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.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
Jul 23 '05 #5

P: n/a

<or*******@aol.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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

Jul 23 '05 #6

P: n/a
* Mike Smith:
* or*******@aol.com:
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.


Sorry, that's incorrect.

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

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 23 '05 #7

P: n/a
On Fri, 24 Jun 2005 18:49:50 -0400, "Steven T. Hatton"
<ch********@germania.sup> wrote in comp.lang.c++:
Victor Bazarov wrote:
or*******@aol.com wrote:
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.


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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 23 '05 #8

P: n/a
Jack Klein wrote:
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.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
Jul 23 '05 #9

P: n/a
* Steven T. Hatton:
Jack Klein wrote:
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.


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

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.