Link to home
Start Free TrialLog in
Avatar of azz3879
azz3879

asked on

Cannot delete "file" cannot find the specified file

So I'm a college student and instead of studying last night for my quiz today I stayed up until 5 am trying to delete a file that is on my desktop that won't go away. Sounds crazy I know but when I'm trying to figure something out I don't stop until the sun comes up or I figure out the answer.

Well the sun came up.

When I attempt to delete the file I get the reply "Cannot delete "file" : cannot find the specified file"

On June 1st another user had the same problem but was able to fix theirs by going into cmd and deleting the file using its short name plus its file extension.

Here's the link to the message on expert-exchange:

https://www.experts-exchange.com/questions/20632707/Cannot-delete-specified-file.html#8623289

I have also attempted to take ownership of the file but that did not work. I have tried to delete the file in cmd but I've done the problem is, when I look up the file's short name using dir/x the corrupt file short name is listed but it doesn't have an extension. That being the case I can't type the short name cmd to delete it.  

So I was hoping that with my 5 am sob story, someone might actually know how to fix this and be able to help me out.

I've created a screen capture that might allow you to visualize exactly what I am talking about its located here:

http://lennon.csufresno.edu/~jkc26/screencapture.jpg

Thanks for your time and knowledge, it's very appreciated.

Azz3879@hotmail.com
ASKER CERTIFIED SOLUTION
Avatar of sunray_2003
sunray_2003
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of war1
azz3879,
   The file may be read only or hidden.  On the desktop right click on the file and select Properties. Uncheck read-only, hidden, system.  If  no still cannot delete, at the command prompt, type

attrib -h -s -r filename

Then try to delete it.
Avatar of Kenneniah
Kenneniah

Since there isn't anything else in that directory have you tried "erase *.*" from the command prompt, and then "rmdir picks"?
I think War's suggestion should allow you to see it from the command prompt and delete it though.
tried restarting in safe mode?  maybe a currently running service is stopping you.
Try a wild card delete.

DEL *._Picks
I've not had any experience with NTFS filesystems but I know with FAT32 filesystems... if the directory structure is in someway damaged, this can also prevent files from being deleted.  Corrupted filenames may also appear.

Type "ChkDsk C:" and see what errors (if any) it spits out.  Schedule a surfacescan/diskcheck via right-click -> drive -> properties -> Tools -> CheckNow button -> check both boxes,,  if necessary.  Sometimes nothing will be found until the surfacescan is done during reboot process.  (overnight thing)

Most likely however, another program has locked the file and is preventing its deletion.  Ctrl+Alt+Delete will allow you to see what is running and shutdown any suspicious processes.  However, even with that process shutdown... the file may still remain locked by the system.  Rebooting in SafeMode as suggested above would be your best option in that case... if that fails... use a bootdisk/CD and access the file via that means.
Also, BEFORE rebooting... check HKCU / HKLM ...\Software\Microsoft\Windows\CurrentVersion\... Run / RunOnce
eliminate any program that may be responsible for creating/locking that file.  There are numerous other locations from which it could be loaded...
Avatar of azz3879

ASKER

So I tried a variety of options, but I ended up downloading the "Zap" program which was recommended in another similar post and that did the job...

http://helpdesk.kixtart.org/KixUtilsTasks.asp

Thanks for everyone's help, much appreciated.

JKC
The most common cause of being unable to delete or copy a file and getting the error 'cannot find the specified file' is the path length exceeds 256 characters.

'Check disk' won't help, you will not be able to access 'Properties' on this file, your will not be able to open it, and you will not be able to delete it.

To get your file back to normal, 'cut' the folder containing this file and 'paste' it higher up in the folder tree - this will reduce the path length. Then you will again have access to your file - you can then back it up, copy it or delete it as you wish.

How does this happen? If you try and create a file whose path length is too long, Windows will not let you. This is how this situation arises - if you create a file in a folder whose path length is okay, then later move that folder deeper into the tree structure, such that the path length now exceeds 256 characters, Windows happily lets you do this. But three months from now when you try to access that file, you will have the problem described.

No worries - now you have the solution.



Try DelinvFile.exe
http://www.purgeie.com/delinv.htm

It is free and easier to use then zap.exe
It has a GUI like Explorer.

The most commen problem under NTFS systems is
a trailing space i.e. ".file "
Attempting to delete this with windows right-click delete
returns a "cannot find specified path" error.

I had the probelm that after copying a bunch of files over a SAMBA connection from an OSX machine to a WindowsXP there were
also a bunch of hidden ".blah " files. These must been OSX system files.

More info on deleting undeletable files under Windows at:
http://ask-leo.com/why_cant_i_delete_this_file.html

Steven

Formerly know as "TempX103" above.
(Couldn't switch user-names, but used same password.)

You, as a user, can actually employ the same mechanism that programs use to replace/rename/delete protected files.

SCRIPT: Rename & Delete Protected files/directories...
http://forums.sudhian.com/messageview.aspx?catid=81&threadid=51960&highlight_key=y&keyword1=protected


The heart of the code is:
=================
Reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager" /v "PendingFileRenameOperations" /t "REG_MULTI_SZ" /s "*" /d
/??/C:\Directory\FileName.Ext*/??/C:\Directory\RenamedFile" /f
=================

1) To duplicate this without using the script, open up RegEdit.Exe.
2) go to the key
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager"
3) Create a new "Multi-String Value" parameter labeled
"PendingFileRenameOperations".
4) The new string will contain your filenames in the following format:


\??\[DriveLetter]:\[DirectoryName]\[FileName.Ext]
\??\[DriveLetter]:\[DirectoryName]\[FileName.Ext]


The first line above is the full path to the file that you wish to rename.
The second line above is the destination path and filename that you wish to
give it.

RESTATING:
There will be *two* lines for every file that you wish to rename in the
above format.
The first line is your file.
The second line is your renamed file.
recommend you use Delete FXP Files™ from JRTwine Software.
http://www.jrtwine.com/Products/DelFXPFiles/index.htm

it will delete any file/directory that you need it to... it rocks.
I know the subject is old but, you dont need a third party program.

Type, del \\.\(Path) and you should see them go away. Worked for me.
Sometimes filenames contain illegal characters and/or have a null character in them.  This was more common on FAT based filesystems.  May not be obvious when a nul character is on the end, at the beginning or in place of a space for instance.  Provided there are no open file handles, creative use of wildcards (* ?) with some particular programs are able to remove them.  Otherwise there are only a few options.  One such recourse is to move all legitimate files over to a new folder, rename the original, then rename the new folder to replace the original.  Another is to use the DiskProbe Windows Support Tool to do direct modification to the MFT or FAT.  There is a program that claims to truncate or delete folders without parsing it's content.  (http://www.SnapFiles.Com) Final option is to backup all content, reformat the partition, then restore the data.  Since non-imaging backup programs won't be able to access or store corrupt filenames, such files won't be backed-up.