Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 The Yak Corral
 Create this folder in windows !!!

Author  Topic 

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-11-21 : 10:49:20
Have any body tried to create a folder by name con in windows?

Try it and see !!!

Thanks

Karunakaran

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-11-21 : 11:08:43
gives an error that it can't be created.
what's the catch?

Go with the flow & have fun! Else fight the flow
Go to Top of Page

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-11-21 : 11:16:13
quote:
Originally posted by spirit1

gives an error that it can't be created.
what's the catch?

Go with the flow & have fun! Else fight the flow



Frankly, I too dont know ! One of my friend told me you cant create a folder called con anywhere in windows

You get an error? I didnt get any error, but if I rename the folder to con it always reverts back to the old name of the folder.

Thanks

Karunakaran
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-11-21 : 11:26:01
in windows explorer yes.
but i use total commander and there it gives an error that it can't be created.
you can't create it in the windows folder.
anywhere else is ok

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-11-21 : 11:56:57
Guess you guys never used MS DOS.

CON is a reserved device name for the \\. pipe.






CODO ERGO SUM
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-11-21 : 12:34:25
LOL!
hell when dos 3.3 was out i was around 10 years old...

so then why only in windows folder?


Go with the flow & have fun! Else fight the flow
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-11-21 : 14:03:48
Not sure what you mean by "only in windows folder".

I wan't able to create a directory anywhere named CON with Windows Explorer or from the windows command prompt. (Windows 2000, didn't try it with XP).

quote:
Originally posted by spirit1

LOL!
hell when dos 3.3 was out i was around 10 years old...

so then why only in windows folder?


Go with the flow & have fun! Else fight the flow



CODO ERGO SUM
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-11-21 : 14:05:34
ok i feel a bit ridicolous now...
i typed com and it looked like a con.
damn... someone conned me

Go with the flow & have fun! Else fight the flow
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-11-21 : 17:19:13
People who used DOS usually know about CON.
There was a trick to creating a file on the fly from the command prompt using the COPY command with CON as the input file:

Y:\>copy CON my.txt
type in anything you want
type some more stuff
end with a control-Z
^Z
1 file(s) copied.

Y:\>type my.txt
type in anything you want
type some more stuff
end with a control-Z

Y:\>


Don't get me started on the joy of editing text files with EDLIN. The EDLIN text editor is still there for those who enjoy using antique programs.






CODO ERGO SUM
Go to Top of Page

Doug G
Constraint Violating Yak Guru

331 Posts

Posted - 2005-11-21 : 22:50:36
You can create folders with reserved names like con from code. Hackers do this to create "undeletable" folders on a hacked computer.


======
Doug G
======
Go to Top of Page

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-11-21 : 22:55:36
quote:
Originally posted by Michael Valentine Jones

Not sure what you mean by "only in windows folder".

I wan't able to create a directory anywhere named CON with Windows Explorer or from the windows command prompt. (Windows 2000, didn't try it with XP).

quote:
Originally posted by spirit1

LOL!
hell when dos 3.3 was out i was around 10 years old...

so then why only in windows folder?


Go with the flow & have fun! Else fight the flow



CODO ERGO SUM



I use XP, I couldn't create it XP...

Karunakaran
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-22 : 01:18:13
quote:
Originally posted by karuna

Have any body tried to create a folder by name con in windows?

Try it and see !!!

Thanks

Karunakaran


Here is the reason
http://www.kbalertz.com/kb_279868.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

The Enigma
Posting Yak Master

179 Posts

Posted - 2005-11-23 : 04:17:29
Ok ... try this on a command prompt...

mkdir \\.\c:\con

to remove use

rmdir \\.\c:\con
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-23 : 04:31:08
Well. How does it work in command prompt?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

The Enigma
Posting Yak Master

179 Posts

Posted - 2005-11-23 : 05:04:37
The reason why you can do it is because you have bypassed the win32 api by using the \\.\ notation. Though, its not a good idea to be doing this
Go to Top of Page
   

- Advertisement -