Can't Delete a File

  • Thread starter Thread starter Jim Romanchek
  • Start date Start date
J

Jim Romanchek

I have two files that I can't delete. They show up in Windows Explorer
and in a "Dir" listing from a command prompt. In either case when I try
to delete them I get a "File Not Found" error. The "Dir" command shows
349 bytes for one and 760 bytes for the other. The file names are very
long with a lot of strange characters, and end with .js (as in java
script). They are deep in a directory structory and are preventing me
from deleting a large amount of useless files.

Any help would be greatly appreciated.

Jim
 
From a command prompt try;

dir /x
and try deleting them using their 8.3 short names.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I have two files that I can't delete. They show up in Windows Explorer
| and in a "Dir" listing from a command prompt. In either case when I try
| to delete them I get a "File Not Found" error. The "Dir" command shows
| 349 bytes for one and 760 bytes for the other. The file names are very
| long with a lot of strange characters, and end with .js (as in java
| script). They are deep in a directory structory and are preventing me
| from deleting a large amount of useless files.
|
| Any help would be greatly appreciated.
|
| Jim
|
 
I had this problem a while back. If I recall, the problem wasn't the file
but the length of the file name. I had to change the names of the files to
something very short then I could kill them.

Good Luck.
 
Thanks for the suggestion. Using dir /x I got a short name, but when I used
it with del it still came up "File Not Found".
Jim
 
Sounds good, but how did you change the filename? When I try the rename
command, nothing happens.
Jim
 
You may want to run chkdsk on the drive. From a command prompt;
chkdsk

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks for the suggestion. Using dir /x I got a short name, but when I
used
| it with del it still came up "File Not Found".
| Jim
 
Jim Romanchek said:
I have two files that I can't delete. They show up in Windows Explorer
and in a "Dir" listing from a command prompt. In either case when I try
to delete them I get a "File Not Found" error. The "Dir" command shows
349 bytes for one and 760 bytes for the other. The file names are very
long with a lot of strange characters, and end with .js (as in java
script). They are deep in a directory structory and are preventing me
from deleting a large amount of useless files.

Any help would be greatly appreciated.

Jim

You may need to shorten the path name (in fact you should ask
yourself why you're placing your information into the path instead
of the files themselves!). There are two ways to do this:

subst x: "c:\This is a very long path name\and it goes on and on\and it
never ends", or
net use y: "\\%ComputerName\c$\This is a very long path name\and it goes on
and on\and it never ends"

You should now be able to delete the problem files via drives X: or Y:,
probably by using wildcards or 8.3 names as suggested by other
respondents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top