in all versions of Windows we are unable to rename a file or a folder name as con unless we use a renaming software. Why a file or a folder can't be renamed as con?
|
|
"con" is the name of a system I/O device, the console.
And a couple others, I think. In the old days it was common in DOS to create a file (and I still do this occasionally) with:
|
|||||||||||||
|
|
|
|||||
|
|
i gave this answer to a duplicate, and thought i'd post it here for your reference: as previously stated. it's a reserved word from back in MS-DOS, for the CONsole device (as far as i can remember). but, you can force windows/dos to create the folder for you. for devices, it uses the format
for example, to create CON folder on my desktop,
to delete the folder, you have to reference it the same way, or else it won't work.
my advice though is to just use a different name. it would be very difficult to always refer to it via its absolute path, especially if you are developing an app you plan on deploying. |
|||
|
|
|
This is because it is used to represent the "internal devices". However, you can create this folder using the following command in a command prompt:
This folder can't be deleted via right click, delete. You have to use the following command (again in a command prompt):
Source: http://yhisham.blogspot.in/2012/09/mystery-about-con-folder-in-windows.html |
||||
|
|
|
You can rename it without using any special software, just the command prompt: For example:
After |
|||
|
|
|
Just like there are characters that cannot be used in a filename, there are also several words (whole filenames) that cannot be used because they are reserved. |
|||
|
|
|
So it is a reserved word and cannot be used as a folder name in Windows. |
|||
|
|
|
As mentioned, you can create and manipulate files and folders with reserved names on the command line by using a device or filename namespace such as
Any access to an object with a reserved device name is treated as referring to the device specified by that name, unless you use the aforementioned namespace workaround. These errors occur because Windows is attempting to operate on them as if they were normal folders, but you can't open a device named |
|||||
|

