General discussion

Locked

Error deleting file

By jcbrito_77 ·
I'm running a Win NT 4.0 with service pack 6. There are two file i can't delete this the error i get.

Cannot delete file: filename you specified is invalid or too long. Specify a different filename.

Help will be appreciated.

This conversation is currently closed to new comments.

13 total posts (Page 1 of 2)   01 | 02   Next
Thread display: Collapse - | Expand +

All Comments

Collapse -

Error deleting file

by TheChas In reply to Error deleting file

Either the file name is too long, or the DOS file name does not properly match the Windows file name.

Boot into DOS mode, and manually browse to the folder and delete the file using the DOS name.

Chas

Collapse -

Error deleting file

by jcbrito_77 In reply to Error deleting file

Poster rated this answer

Collapse -

Error deleting file

by tduval In reply to Error deleting file

Right, but don't boot into dos mode, there is none in NT !
Start, execute, command
Go to your subdir, and use wildcards to delete you file (del someth*.*).
If "Access refused", then this file is in you (IE service loaded).

Collapse -

Error deleting file

by jcbrito_77 In reply to Error deleting file

Poster rated this answer

Collapse -

Error deleting file

by Ann777 In reply to Error deleting file

Start --> Run --> Command

cd subdirectory

And keep issuing the cd (change directory) command with a space and the next subdirectory until you see the filename (with the dir command)that you want to delete...

Then

del progra~1.ext

Use only the first six charachers of the real filename and then use the ~1 and then the dot and real extension.

That should delete the offending file (unless the file is being used by the operating system). If the OS is using the file, then you need to stop the service that uses this file before deleting the file.

Collapse -

Error deleting file

by jcbrito_77 In reply to Error deleting file

Access is denied
I tried to del the file in DOS mode no luck. The file name starts with con. and it ends with .jpeg
this is what I tried in DOS mode

I'm in the directory which the file is in I do a
DEL *.*
ACCESS IS DENIED

There is only one file in that folder so I try deleting every thing in there. Again it has a weird name that starts with con. and ends with a .jpeg extention.
Also tried

DEL *.JPG
ACCESS IS DENIED

Help will be appreciated

Collapse -

Error deleting file

by Ann777 In reply to Error deleting file

You didn't tell us the file is named con!!!!

In fact, no Win32 tool will delete certain files that are considered part of console (con or nul).

One possible solutions is to use non-Win32 tools. For instance, the Resource Kit contains POSIX utilities such as rm.exe, which should allow you to delete the file:
c:\NTReskit\posix\rm con.jpg
(rm is remove or the unix equivalent of del)

There is an easier way, without using reskit and non-native subsystems which is to rename the file then just delete:

C> ren \\.\c:\con.jpg trash.jpg
C> del trash.jpg

The problem for you is that something is using the file (thus the "access denied"). Have you tried stopping all services, renameing the file (as above), and then deleteing it and starting the services back up?

If the above does not work, then I haven't got any more ideas. Sorry.

Collapse -

Error deleting file

by Ann777 In reply to Error deleting file

One more thing to try :

del "d:\wherever\this\file\is\con.jpg"

notice the encased quotes

Collapse -

Error deleting file

by jcbrito_77 In reply to Error deleting file

I did every thing you mentioned above nothing worked. I restarted the system and when the system came back on the file weren?t there any more sound weird but the files are gone.The first thing I did when I wasn't unable to delete the file was check them for viruses. So will give you the point for helping me
Thanks

Collapse -

Error deleting file

by zaheerahmed2 In reply to Error deleting file

Ok need to know where these files r located could it be anything to do with permissions

Back to Windows Forum
13 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums