This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

HOWTO: Delete undeletable files in NT


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]