How to Remove Files with Reserved Names in Windows XP
This article was previously published under Q315226
This article has been archived. It is offered "as is" and will no longer be updated.
For a Microsoft Windows 2000 version of this article, see 120716.
Because applications control the policy for creating files in Windows, files sometimes are created with illegal or reserved names, such as LPT1 or PRN. This article explains how to delete such files by using the standard user interface.
You must be logged on locally to the Windows-based computer to delete these files.
If the file was created on a file allocation table (FAT) partition, youmay be able to delete the file under MS-DOS by using standard command lineutilities (such as DEL) with wildcard (*) characters, for example:
DEL PR?.*These commands do not work on an NTFS file system partition. For this case another option would be to use a syntax that bypasses the normal reserved-word checks altogether. You may be able to delete any file by using a command like this:
DEL \\.\drive letter:\path\file nameFor example:
DEL \\.\c:\somedir\auxIf the name in the file system appears as a directory, you may be able to delete any directory by using a command like this:
RD \\.\drive letter:\path\directory nameFor example:
CON PRN AUX CLOCK$ NUL COM1 LPT1 LPT2 LPT3 COM2 COM3 COM4
Article ID: 315226 - Last Review: 12/07/2015 08:29:01 - Revision: 4.2
Microsoft Windows XP Home Edition, Microsoft Windows XP Professional
- kbnosurvey kbarchive kbinfo kbusage KB315226