00 Votes

Windows: Why is it not possible to create the file "nul.txt"?

Question by Larosso | 2017-05-16 at 19:17

I have tried to create a file named "nul.txt" today. Strangely, this is not working and I always get the meaningless error message "The specified device name is invalid" when trying to rename an existing file to this name. My operating system is Windows.

Can someone explain this behavior? And what does a file have to do with a device or a device name?

0Best Answer0 Votes

The name "NUL" is (like some other names) a reserved word for a device on Windows so that filenames with "NUL" are not allowed. The file extension as well as uppercase and lowercase writing are not playing any role: nul.txt is not allowed like nul.doc, nul.x or any other combination.

Because this issue is a bit more complex, I have created an info describing why the names con, aux, nul, com1 or lpt1 cannot be used as file or folder names on Windows. If you want, you can learn more about this topic there.
2017-05-16 at 23:40

ReplyPositive Negative

Related Topics

"G" or "E" sign on my mobile

Question | 1 Answer

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.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.