Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Can You Create A Folder Name "con", Is it possible to create a folder named "CON" in Windows?
abartar
post Aug 25 2006, 09:29 AM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 37
Joined: 11-August 06
Member No.: 15,118



I tried in both Windows XP Home and Professional. If you try to make a folder named "CON" Windows XP renames it back to what it was. So creating a new folder with the name "CON" just renames it to "New Folder".

The bug seems like a variable that got treated as a string or vice-versa. Trying to create the folder from a cmd prompt failed with an error "The directory name is invalid.".

This also works when you try to create a file called "CON", or "CON.". ".CON" shows up the way it should.

Somewhere I found the reason that CON stands for CONsole which is device name but why does Microsoft have to be so restrictive???

Go to the top of the page
 
+Quote Post
sparx
post Aug 25 2006, 10:03 AM
Post #2


Premium Member
Group Icon

Group: Members
Posts: 243
Joined: 20-January 05
From: Bombay, INDIA
Member No.: 2,231



Device names such as COMx, CON or LPTx are reserved words, and they can't be used as folder or file names.

There's also a patch released under Win 9x that plugged asecurity hole that allowed a malicious user to gain control of a remote machine because of the way Win9x parsed path names.

More details here

The Wikipedia Article #1 also describes certain filename characteristics.

WIkipedia article on DOS Device file also mentions why the OS willl not allow a user to name a file / folder using certain reserved words and characters.
Go to the top of the page
 
+Quote Post
Mark420
post Aug 25 2006, 10:07 AM
Post #3


The Modernator
Group Icon

Group: Members
Posts: 486
Joined: 6-August 06
From: The Interweb!
Member No.: 15,021



ahha !!! Ive seen this before many many moons ago...
Like a lot of Winblows "features" this comes back to DOS and the way the file system works..
I bumped into this problem years ago when messing around with networked printers..I had to set up 5 new printers and I tried to name a folder "lpt1" for the name of the first printer and then i was going to put the drivers in that folder and share it out to all users..but I had the same problem..it wouldnt make the folder at all...I did some research and found out its because of DOS..also making folders with names such as anything starting in "com" such as "com1" give the same result..Its DOS reserving these names because it uses them itself to address these ports.

But hey theres a trick!!! try this!!-goto the command line then type this

cd\
mkdir \\.\c:\con

See how this works???now try to delete it!! in explorer---hahah!!!

The reason this is possible is down to UNC naming conventions..by adding the \\ in the statement it makes windows ignore the old DOS command to reserve this folder name..

Years and years later MS still finds funny quirks in DOS for us to play with wink.gif))

Ok I will be nice and tell you how to get rid of it...

Its a simple as this..
rmdir \\.\c:\con

Have fun!!

Edit:Damm someone beat me by 30 secs to get the reply to this post ;((

This post has been edited by Mark420: Aug 25 2006, 10:08 AM
Go to the top of the page
 
+Quote Post
Pharoah
post Aug 25 2006, 12:59 PM
Post #4


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 73
Joined: 19-August 06
Member No.: 15,394



It's wierd that it's still like that in XP! 9x I can understand because that's just a little shell, but XP was supposed to write all the 16 bit code out, and you think that would take all this wierd device-as-file stuff with it.
Cool tip about the //, i've never heard of that before. Somewhere on the web I found a list of secret DOS commands once. Very cool!
Go to the top of the page
 
+Quote Post
yordan
post Aug 28 2006, 01:23 PM
Post #5


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



By the way, "CON" is for "CONSOLE", which is... the keyboard.
An old way of creating files was the following : in a COMMAND window type "copy con myfile.txt"
Then type any text
and finish with CTRL-Z.
You will see the message "one file copied".
then "type myfile.txt", you will see your text.

To summary, "con" is the keyboard (or the console), so you can directly write down a file by copying CON to a file.
The same way, you can type directly to the printer by issuing "copy con prn:", everything you type on the keyboard will be redirected to the printer, you re-invented the typing machine. Don't forget to finisth with CTRL-Z.
Go to the top of the page
 
+Quote Post
BitShift
post Sep 9 2006, 08:47 PM
Post #6


Advanced Member
Group Icon

Group: Members
Posts: 153
Joined: 8-May 06
From: Houston, TX
Member No.: 13,291



Its just another classic example of why Windows is failing. They refuse to update and improve their kernel and remove old DOS functions that are outdated and no longer needed.

They have code in their kernel that hasn't changed since Windows 95, its pathetic. They could put in so many optimizations but they refuse to. Something about "compatibility issues" with older systems but its all just trash. They are blown away from the fact many businesses and schools are trying to convert to Linux, they just will not ever understand.

I havn't asked my friend at Microsoft about the kernel Vista will be running off of but I'm sure its still the same story.
Go to the top of the page
 
+Quote Post
xboxrulz
post Sep 9 2006, 10:30 PM
Post #7


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,724
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233



yes, Microsoft actually said that they leave tonnes of holes unfixed because of compatibility issues. Most of these compatibility issues are caused by stuff they wrote in 1995. Seriously, they should take that old code out since no one would use it. At least update it if they don't pull it out.

xboxrulz
Go to the top of the page
 
+Quote Post
yordan
post Sep 10 2006, 04:53 PM
Post #8


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



OK, folks, don't go so fast.
I think some old features have to stay. Every languate will have special device names, or reserved names. So, you will always face the problem not being able to name things exactly as you want.
I am currently working under linux, and I get angry because my test program cannt be named "test", because test is a reserved word.
And remember the old Unix/linux thing. Remember the "dd" command, this program is named "Copy and Convert". And wy cannot the command be "cc" ? Because the "cc" word was already reserved.
So, Microsoft stays sticky to the old device conventions, and I agree with them. it's sligthly disturbing that you cannot name your object "con", but we can accept that. Simply remember that the polite French language also asks you not to use that word....
Go to the top of the page
 
+Quote Post
BitShift
post Sep 10 2006, 08:11 PM
Post #9


Advanced Member
Group Icon

Group: Members
Posts: 153
Joined: 8-May 06
From: Houston, TX
Member No.: 13,291



You have a good point but Linux at the very least is moving forward and replacing most older code with newer code. Of course every kernel is going to have some parts that you just have to leave alone for a while to keep compatibility up but the way Microsoft is managing the Windows kernel is just ridiculous.


MSDOS creates so many security holes in Windows despite how hard administrators try to block it, because once you get into a DOS prompt the computer you are on has been exploited and is at your mercy. Why is this possible? It is because Windows refuses to update it or replace it with something else because it won't be compatible with older computers. I just don't understand. People are moving on with technology these days and we have to stop worrying about compatibility issues on old systems. They need to move on.
Go to the top of the page
 
+Quote Post
Grafitti
post Oct 24 2006, 03:28 PM
Post #10


Premium Idiot
Group Icon

Group: [HOSTED]
Posts: 661
Joined: 9-July 05
From: Switzerland, but currently in Pakistan
Member No.: 6,943



But Vista, built on a different kernel (ripped from linux, or so i've heard) will incorporate a different code architechture, which doesn't use DOS, for one. So theoretically, it could be a much more secure OS, the only problem is with the huge amount of third-party software, which requires that old kernel to run. If the big businesses insist on Microsoft leaving Vista open. then we might not be much better off, and i don't know what i'd prefer. Having to get all my programs over again, or working with a buggy system that I can still patch to my liking.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What Is The Use Of Service Packs For Windows?(15)
  2. Microsoft Service Pack 2 Cd (free)(17)
  3. Windows Not Recognizing Ipod(20)
  4. How To Increase Windows Shutdown Speed(39)
  5. A Note To All Illegal Windows Xp Owners(47)
  6. Command Line (dos) Tips For Windows Xp(5)
  7. How To Create "ghost" Images (norton) On Windows(46)
  8. Disable Recent Docs History In Windows(2)
  9. Problem Deleting Empty Folder In Win XP(13)
  10. 12 Things You Didn't Know About Windows XP(5)
  11. Using Same Serial # On Multiple Copies Of Windows(15)
  12. Help: Adding My Videos Folder To Start Menu(10)
  13. How To Run Mac On Windows ?(14)
  14. Windows Server 2003(8)
  15. The Best Version Of Windows(42)
  1. Windows XP Error: Explorer Crashes While Drag & Drop(14)
  2. Windows XP Folder Encryption Key ?(13)
  3. Folder Without A Name ...(25)
  4. Lock Workstation Shortcut(8)
  5. Deleting A Corrupt File(25)
  6. Will Using Fdisk Corrupt Windows Partition?(9)
  7. How To Make Windows Xp Faster(30)
  8. Windows Vista(5)
  9. Windows Xp Sp3 Available(16)
  10. Windows Sp4 ?(8)
  11. Why I May Be Installing Windows Xp Sp3 Again(7)
  12. Image Problems With Windows 2000(8)
  13. Windows 7(4)


 



- Lo-Fi Version Time is now: 30th August 2008 - 04:30 AM