I tried to use "nul" instead of "/dev/null" in Cygwin. That created a file called "nul". When I tried to delete the file in Explorer, I got an interesting "Invalid MS-DOS function" error:
The file can be deleted (and otherwise manipulated) from Cygwin. It can also be deleted from the Windows Command Prompt by prefixing its full path with "\\?\".
Subscribe to:
Post Comments (Atom)
11 comments:
You're a genius. Any idea why this prefix works? What it means? I finally completely removed cygwin, other useful commands for removing locks and folders for which the user has no permission.
C:\>takeown /f sendmail.lnk && icacls sendmail.lnk /grant {USERNAME}:F
or for all files in a folder
C:\>takeown /f * /r /d y && icacls * /grant {USERNAME}:F /t
you are the best this was driving me crazy!! Thanks :D
Thanks for making this info available. But what does \\?\ mean?
"For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system."
Thank's a lot :D ! (From Italy)
Merci beaucoup (thanks a lot) from France.
I was encountering this problem developping with eclipse (one of my program just created a file starting by "null" ...)
Thanks! Still useful!
Thanks. It was driving me crazy.
i tried doing the same but im get an access denied message
actually i used folder lock to lock some files.It was only a trail version and expired after some days. Then i couldn't open the locked files.So i uninstalled folder lock. All the files i locked had NUL.prefix . Any other solution? coz i tried the \\?\ prefixing it only gave me a access denied message
The fact you're getting "access denied" instead of "could not find" means you entered the right string for the file, but something else is stopping you. Maybe the file has the read-only attribute. Try "del /f" which overrides that. If a file had hidden, system and read-only attributes, you could use "del /a /f". If you still get access denied, there may be a permissions issue, and you should try again from a command prompt running as Administrator.
Post a Comment