How to delete zero byte files (cmd commands don't work)

Status
Not open for further replies.

Gondvanaz

Honorable
Nov 25, 2014
143
0
10,680
After typing cmd commands, i get "The system cannot find the file specified" messages. I tried commands like DEL /F /S /Q /A "D:\Torrents\*" (folder's name is Torrents) but nothing works so far. Files' type is file, size - 0 byte. They appeared after downloading torrent files.
 
Solution
Are you sure the file you're trying to delete is open, or you don't have the rights to delete it?
Second - make sure you run PE showing all processes (File | Show all processes...)

Gondvanaz

Honorable
Nov 25, 2014
143
0
10,680

How to find out the process which keeps that file open? I typed file's name in "Find handle or Dll" (process explorer search) and it did find nothing.
 

Tom Brock

Prominent
Apr 22, 2017
2
0
510
I had this same problem. The solution in my case was simple (though I needed help thinking beyond the obvious).

Windows could not delete the file and threw the same error seen in the original post. Likewise using cmd, I could not delete the file. Or so I thought.

The file name *appeared* to be "Re-".
- However "del Re-" failed.
- But... I noticed that there seemed to be a space in the filename, that is "Re- " (using properties) and not "Re-".
- However again, "del Re- " failed.
- Eureka! "del Re-*."

In my case there was some unknown character that appeared as a space that was confounding Windows and cmd. The wildcard "*" took care of it.
 
Status
Not open for further replies.