This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
HOWTO: Delete undeletable files in NT
- To: Nicola Bernardini <nicb at axnet dot it>, "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>
- Subject: HOWTO: Delete undeletable files in NT
- From: "Parker, Ron" <rdparker at butlermfg dot org>
- Date: Fri, 13 Feb 1998 13:15:37 -0600
As others have said, MS-DOS, Windows 9X and the Win32 subsystem of NT
treat CON.* as a reserved name for the console. It is mapped into the
DosDevices namespace of the NT Object Manager. To delete files of this
type, you must bypass the Win32 subsystem's file name checking
routines. This may be done by referencing the file with \\.\<FULLPATH>
or \\?\<FULLPATH>. Either the NT 'del' command or the gnu-win32 'rm'
command will work provided you do this.
Examples:
* del \\?\C:\dir\con.c
* rm //?/C:/dir/con.c
* rm \\\\?\\C:\\dir\\con.c
In my spare time I am working on patches to cygwin.dll that will use
this convention to allow for using reserved file names. This will help
with distributions that have con*, aux* and other such files in them.
application/ms-tnef