0 0 Votes

Why are certain characters not allowed in file names?

Question by Mopsi99 | 15/05/2017 at 17:17

When trying to rename a file and trying to write for example a question mark, an exclamation mark, a quote, an asterisk, a colon, a greater than or a less than sign into the name, I get the following error message:

A file name can't contain any of the following characters: \ / : * ? " < > |

Accordingly, the filename is not changed, the entered character is not taken over to the new name. But why is it so? Why can I not use arbitrary characters for my file names?

PS: I am using the operating system Windows. I do not know whether the same applies for Linux or Apple Mac.

ReplyPositiveNegative

Stefan Trost

Show Profile | Message
Avatar
0Best Answer
0 Votes

Some characters have a special meaning for the operating system and therefore they cannot appear in file names.

Let us take the backslash \ as an example. In Windows, this character is used as a delimiter for separating folders from each other. For instance "C:\Folder\Folder\File.txt". If backslashes were allowed in filenames, we could not say whether "Fi\le.txt" is the name of a file or whether it is the file "le.txt" located in the folder "Fi".

The same applies to the other characters you have mentioned. All of them have a special syntactical meaning within path specifications and for excluding ambiguities, they cannot be allowed to be used within filenames.

By the way, the characters not allowed can be different from operating system to operating system, depending on which characters have a special meaning on the corresponding system.
16/05/2017 at 14:25

ReplyPositive Negative
Reply

Related Topics

Rename File to its Folder Name
Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.