Just out of Curiosity...

Hi All,

I found a fact… if anybody (File System Devlopers) interseted can explain…

In Windows Xp you cannot create a folder with name as
“con” why???

bye
Biswaroop

You cannot create a folder/file with a name equal to a reserved name (CON,
AUX etc.)

Bisban wrote:

Hi All,

I found a fact… if anybody (File System Devlopers) interseted can explain…

In Windows Xp you cannot create a folder with name as
“con” why???

bye
Biswaroop


You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.

Bisban,

you wrote on Wednesday, October 22, 2003, 20:27:42:

B> In Windows Xp you cannot create a folder with name as
B> “con” why???

Same for “nul”, “COM1”, “LPT1” and a few others I can’t remember right
now. It has been this way since the days of DOS in all versions of
Windows. These are reserved system device names and cannot be used as
file names.

Ralf.

Not only in windows XP, AFAIK it even used to apply for DOS and other MS
operating systems.

CON, COMx, AUX, NUL,… are special files.


Elias
http://lgwm.org/
“Bisban” wrote in message news:xxxxx@ntfsd…
>
> Hi All,
>
> I found a fact… if anybody (File System Devlopers) interseted can
explain…
>
> In Windows Xp you cannot create a folder with name as
> “con” why???
>
> bye
> Biswaroop
>
>
>

Thank you all for the answers…
Can we get the list of all the special names… are they stored somewhere
in our system or retrieve them programmatically…

bye
biswaroop
----- Original Message -----
From: “lallous”
Newsgroups: ntfsd
To: “Windows File Systems Devs Interest List”
Sent: Wednesday, October 22, 2003 12:03 AM
Subject: [ntfsd] Re: Just out of Curiosity…

> Not only in windows XP, AFAIK it even used to apply for DOS and other MS
> operating systems.
>
> CON, COMx, AUX, NUL,… are special files.
>
> –
> Elias
> http://lgwm.org/
> “Bisban” wrote in message
news:xxxxx@ntfsd…
> >
> > Hi All,
> >
> > I found a fact… if anybody (File System Devlopers) interseted can
> explain…
> >
> > In Windows Xp you cannot create a folder with name as
> > “con” why???
> >
> > bye
> > Biswaroop
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@integramicro.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Don’t know if you can, however you can call win32 API GetFileType() and
compare w/ FILE_TYPE_DISK instead of FILE_TYPE_PIPE or FILE_TYPE_CHAR.


Elias
http://lgwm.org/
“Bisban” wrote in message news:xxxxx@ntfsd…
>
> Thank you all for the answers…
> Can we get the list of all the special names… are they stored somewhere
> in our system or retrieve them programmatically…
>
> bye
> biswaroop
> ----- Original Message -----
> From: “lallous”
> Newsgroups: ntfsd
> To: “Windows File Systems Devs Interest List”
> Sent: Wednesday, October 22, 2003 12:03 AM
> Subject: [ntfsd] Re: Just out of Curiosity…
>
>
> > Not only in windows XP, AFAIK it even used to apply for DOS and other MS
> > operating systems.
> >
> > CON, COMx, AUX, NUL,… are special files.
> >
> > –
> > Elias
> > http://lgwm.org/
> > “Bisban” wrote in message
> news:xxxxx@ntfsd…
> > >
> > > Hi All,
> > >
> > > I found a fact… if anybody (File System Devlopers) interseted can
> > explain…
> > >
> > > In Windows Xp you cannot create a folder with name as
> > > “con” why???
> > >
> > > bye
> > > Biswaroop
> > >
> > >
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@integramicro.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>

This is Win32 subsystem which does not allow you to create such files. It
also fails creation of such files like “con.exe”. You can still create a
file with reserved file name using Native API or a file name like
“\\?\C:\con.exe”. There is some virus or trojan which uses this
technique.

-htfv

“Bisban” wrote in message news:xxxxx@ntfsd…
>
> Hi All,
>
> I found a fact… if anybody (File System Devlopers) interseted can
explain…
>
> In Windows Xp you cannot create a folder with name as
> “con” why???
>
> bye
> Biswaroop
>
>
>