Jump to content

Recommended Posts

Guest JoeZmarly
Posted

Still running Windows XP Pro SP3 (because my old CAD software doesn't want to play nice with Win7 or Win8.1). Cannot delete a file named "NUL" (without the quotes). It is in a subdirectory which I was able to rename and move to the root of the drive, but the file in that subdirectory simply can't be deleted. I tried encrypting the file and get "Error Applying Attributes" E:\junk\NUL The parameter is incorrect. Doing "dir /x" simply lists the file as NUL (so no hidden characters). Can't rename the file, "ren NUL something" returns "Parameter is incorrect". Can't do anything from Windows Explorer, just error messages whenever I try to delete the file or the directory. From a command window get:

 

 

E:\junk>dir

Volume in drive E is New Volume

Volume Serial Number is 8C04-1400

 

Directory of E:\junk

 

06/03/2014 01:09 PM <DIR> .

06/03/2014 01:09 PM <DIR> ..

11/04/2013 03:17 PM 29 NUL

1 File(s) 29 bytes

2 Dir(s) 35,894,820,864 bytes free

 

 

E:\junk>type NUL

 

 

E:\junk>

 

 

(So the file appears to actually be empty and not 29 bytes long)

 

(Editing the file with Notepad++ and viewing in hex mode shows no data, not even 0x00 bytes so Notepad++ thinks it's an empty file)

 

 

E:\>rd junk /s/q

junk\NUL - The parameter is incorrect.

 

 

E:\junk>attrib *

A E:\junk\NUL

 

 

E:\junk>del NUL

The filename, directory name, or volume label syntax is incorrect.

 

 

Putting NUL in quotes gives the same error.

 

 

Running the sysInternals ProcessExplorer.exe program and searching for a process that has the NUL file locked turns up nothing. Booting up in safe mode and I still can't delete the file.

 

 

After keying in the above it occurred to me to try cygwin. Low and behold doing the following:

 

 

$ cd /cydrive/e/junk

 

$ rm -f NUL

 

 

and the file is gone! Many thanks to the cygwin team!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...