File Operations
Deleting Reserved Filename Files
Windows has several reserved filenames (like nul, con, prn, aux, etc.) that cannot be created or deleted using normal methods. Sometimes, tools or scripts may accidentally create files with these reserved names.
Delete Reserved Filename (nul)
If a file named nul is accidentally created (e.g., by Claude Code or other automation tools), you can delete it using this command:
cmd
del "\\?\C:\full\path\to\file\nul"WARNING
This command must be executed in Command Prompt (cmd.exe), not PowerShell.
Example
cmd
del "\\?\C:\Users\mauro\project\nul"Explanation
\\?\- This prefix tells Windows to skip normal path parsing and use the raw path- This allows access to files with reserved names that would normally be blocked
- You must provide the full absolute path to the file
- This also works for other reserved filenames like
con,prn,aux,com1,lpt1, etc.