- May
- 80
- 0
I have a file on my desktop named "AUX.TXT". According to the MSDN documentation, I should be able to delete that file with the following command:
DEL \\?\C:\Users\GSchizas\Desktop\AUX.TXT
Indeed, that's what happens with Windows Command Processor (cmd.exe).
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
(no output, it's cmd.exe we're talking about)
This also works (undocumented behavior maybe? \\.\ is supposed to be used to directly access devices)
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
In Take Command Console 17, the following works:
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
Deleting \\.\C:\Users\GSchizas\Desktop\AUX.TXT
1 file deleted
Although the documented behavior doesn't:
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\Users\GSchizas\Desktop\AUX.TXT"
0 files deleted
In Take Command Console 18, both behaviors fail, the documented one:
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\Users\GSchizas\Desktop\AUX.TXT"
0 files deleted
And the undocumented one (it fails more spectacularly, but it's probably a more consistent fail):
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\C"
0 files deleted
I can delete the file by using cmd /c del %@quote[\\?\%@full[AUX.TXT]], but TCC should not have to call cmd.exe to perform something as essential as resolving a path.
(This doesn't only apply to invalid filenames, it also applies to very long filenames, filenames with control characters in them etc., filenames written by bad-behaving applications etc.)
DEL \\?\C:\Users\GSchizas\Desktop\AUX.TXT
Indeed, that's what happens with Windows Command Processor (cmd.exe).
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
(no output, it's cmd.exe we're talking about)
This also works (undocumented behavior maybe? \\.\ is supposed to be used to directly access devices)
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
In Take Command Console 17, the following works:
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
Deleting \\.\C:\Users\GSchizas\Desktop\AUX.TXT
1 file deleted
Although the documented behavior doesn't:
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\Users\GSchizas\Desktop\AUX.TXT"
0 files deleted
In Take Command Console 18, both behaviors fail, the documented one:
C:\Users\GSchizas\Desktop>del \\?\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\Users\GSchizas\Desktop\AUX.TXT"
0 files deleted
And the undocumented one (it fails more spectacularly, but it's probably a more consistent fail):
C:\Users\GSchizas\Desktop>del \\.\C:\Users\GSchizas\Desktop\AUX.TXT
TCC: (Sys) The system cannot find the file specified.
"C:\C"
0 files deleted
I can delete the file by using cmd /c del %@quote[\\?\%@full[AUX.TXT]], but TCC should not have to call cmd.exe to perform something as essential as resolving a path.
(This doesn't only apply to invalid filenames, it also applies to very long filenames, filenames with control characters in them etc., filenames written by bad-behaving applications etc.)