Sat Aug 1 08:57:35 PDT 2015

Deleting Irritating Files on Windows XP

Having a look through files on a Windows XP machine recently, I found two irritating files that I could not delete. Windows XP happily gave me a baffling 'Cannot delete file: Cannot read from source file or disk.' message box. (As helpful as usual). The solution to this problem is to prepend \\? to the file name that you are about to delete (using cmd.exe, of course, there is no known solution from the graphical interface). E.g.:

del "\\?\C:\Documents and Settings\User\Desktop\FOIA\documents\yamal\flxlist."

The magic \\? switches off some form of Windows XP file name sanity checking, allowing you to delete files which Windows XP thinks do not have valid names (although, of course, Windows XP did allow the creation of the files in the first place). Anyway, problem solved!

Comments are closed


If you would like to get in touch with me, please mail zfs at themolecularuniverse.com

recent comments

Posted by ZFS | Permanent link | File under: general
[StumbleUpon] [Digg] [Reddit] [Facebook] [Google]