Can't access NTFS file after BSOD. Corruption undetectable by chkdsk?
COM2 is a reserved keyword, quite literally for the hardware port COM2 and I'm not sure how that file got there in the first place, since Windows won't let you create a file called COM2.log
. Try it now, you'll get an error message. For fun, also try creating LPT1.txt
.
According to Naming Files, Paths, and Namespaces, the following are all reserved names and should not be used as file names.
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. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.
You might try renaming the file either in explorer or using ren com2.log somethingelse.log
to see if you can manipulate the file then, however I have a feeling that won't work for the same reason you shouldn't be able to create the file in the first place.
Failing that, if you follow How to Remove Files with Reserved Names in Windows you should be able to remove the file with the following command. Using the same "fully qualified" path, I imagine you'll also be able to rename the file by using REN
instead of DEL
.
DEL \.\C:\SomeDirectory\com2.log
You might try moving the file: move com2* com2.log.new
or something of the sort. The filename itself might be messed up.