Trouble deleting one file

  • Thread starter Thread starter b
  • Start date Start date
B

b

Hi All,
Firstly many thanks to all who reply to posts. I read as many as
possible to try to learn something.

I tried to save an attachment from an email (from a reliable source) and
something went wrong. It did not save correctly. The file name is there with
0 kb file size. I save the file again and it save ok, and I then deleted it.
My problem is that I cannot delete the 0 kb file. A message says
"Cannot delete file. Cannot read from the source file or disk".
It appears that although the file name shows in Windows Explorer, the PC
seems to think it is not there.
I saved another file with the same file name and extension and then
there were two files with identical names in the same folder, but one had 1
kb size. This 1 kb file I can delete, but not the 0 kb file.
How can I delete this file?
Thank you for any replies.
Brian.
 
Hi All,
Firstly many thanks to all who reply to posts. I read as many as
possible to try to learn something.

I tried to save an attachment from an email (from a reliable
source) and
something went wrong. It did not save correctly. The file name is
there with 0 kb file size. I save the file again and it save ok, and I
then deleted it.
My problem is that I cannot delete the 0 kb file. A message says
"Cannot delete file. Cannot read from the source file or disk".
It appears that although the file name shows in Windows Explorer,
the PC
seems to think it is not there.
I saved another file with the same file name and extension and
then
there were two files with identical names in the same folder, but one
had 1 kb size. This 1 kb file I can delete, but not the 0 kb file.
How can I delete this file?
Thank you for any replies.
Brian.

this could be a malformed file name.

1. open a CMD prompt
2. CD to the folder where the 'file' is.
3. issue a DIR /X
4. look at the output for the files 'real' 8.3 DOS name, in the second
last column.
5. use the DEL command with the 'real' 8.3 name.

let the group know if this helps.

Regards,

DanS
 
Hello Rick,
Many thanks for your link to Kellys Korner. I went there and tried but
it did not work quite like that.

I eventually deleted the problem file based on an idea I got from
reading Kellys Korner, as follows.
1 The file was in a directory named PowerPoint Data (2 words)
2 I copied all wanted files to another location, leaving only the unwanted
file.
3 At the command prompt I went to the directory containing PowerPoint Data
and tried to remove the directory with rd /s
4 This did not work. It tried to remove "PowerPoint" and "Data" directories
(which don't exist)
5 I renamed "PowerPoint Data" to be only one word "PowerPoint"
6 rd /s then successfully removed the directory including the problem file.

I had previously tried to delete the directory using Windows Explorer
without success. I had to use the rd /s command.

Many thanks to both gentlemen.
Regards,
Brian.
 
DanS said:
this could be a malformed file name.

1. open a CMD prompt
2. CD to the folder where the 'file' is.
3. issue a DIR /X
4. look at the output for the files 'real' 8.3 DOS name, in the second
last column.
5. use the DEL command with the 'real' 8.3 name.

let the group know if this helps.

Regards,

DanS


Thanks Dan S,
I tried dir /x but the problem file was not listed under any name.
I eventually deleted the problem file based on an idea I got from
reading the Kellys Korner link suggestion by Rick Rogers.
1 The file was in a directory named PowerPoint Data (2 words)
2 I copied all wanted files to another location, leaving only the unwanted
file.
3 At the command prompt I went to the directory containing PowerPoint Data
and tried to remove the directory with rd /s
4 This did not work. It tried to remove "PowerPoint" and "Data" directories
(which don't exist)
5 I renamed "PowerPoint Data" to be only one word "PowerPoint"
6 rd /s then successfully removed the directory including the problem file.

I had previously tried to delete the directory using Windows Explorer
without success. I had to use the rd /s command.

Many thanks to both gentlemen.
Regards,
Brian.
 
Back
Top