Welcome to WebmasterWorld Guest from 54.205.96.97

Forum Moderators: bill

List of FileNames reserved exclusively for Windows Operating System

There are certain filenames which we cannot create...

   
4:28 pm on Oct 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

Is there a list of filenames which are exclusively reserved for windows OS.

I am creating files using a software and one such file was "con". However the software gave an error and when I tried to create that file manually, it gave an error. For example, try creating a file "con" on your PC and you won't be able to create it.

Is there any function in Visual Basic which automatically derives such a list and not create those files, so that the software can proceed without any errors.

Also, is there such a list available so I can manually add them to my software coding.

There is a small list available here: [en.wikipedia.org...] Any more?

[edited by: Imaster at 4:31 pm (utc) on Oct. 20, 2006]

6:16 pm on Oct 20, 2006 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



This is NOT definitive...

CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

I would be more general and disallow COM0..COM9 and LPT0..LPT9

Kaled.

11:13 pm on Oct 20, 2006 (gmt 0)

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Here's what Microsoft says about: Naming a file [msdn.microsoft.com]:
Do not use the following reserved device names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month