Helping people with computers... one answer at a time.

Sometimes a file cannot be deleted because it has invalid characters in its filename. There are techniques and tools to force the delete anyway.

Why can't I delete this file?

It's a fact that you can create files in Windows that are almost impossible to delete using normal methods. Typically it's the result of a hidden character in the filename - a character that for various reasons can't be seen and is difficult if not impossible to type. And yet if you don't specify the correct filename including that odd character you can't delete the file.

I can hear you asking "great, how did that character get there and more importantly how can I delete the file?"

The answer to the first part is speculation but I was recently pointed at a tool that will help with the second.

The biggest issue with invalid names is that not all programs filter out invalid characters from filenames before they pass them on to the system. For example, let's say you happened to accidentally hit the spacebar after the filename when you went to save a file. If the application you're using is not smart enough to strip trailing spaces then it may well create the file with a trailing space. You may think and see "FOO.DOC", but Windows sees "FOO.DOC ". A subtle, but important difference.

What's worse is when you attempt to rename the file or delete the file using a utility that then "does the right thing", it strips trailing spaces before it attempts to operate on the file. You type in or select "FOO.DOC " with a space and the utility takes it as "FOO.DOC" without a space, tries to delete it, and fails because that's not the name of the file!

There are actually several scenarios that can result in files that seem almost impossible to delete. Fortunately they are rare but they do happen.

What to do?

If your file system is FAT or FAT32 or most instances of NTFS you can use the old DOS "shortname". In the days before Windows filenames under MS-DOS could only be 11 characters long. For compatibility with old programs that relied on the 11 character limitation Windows creates a unique "shortname" for every long file name. For example, if your file is named "thisisalongfilename.isntit" a DIR /X in a command shell may show the shortname as "THISIS~1.ISN". It refers to the same file so you can delete using the shortname.

In some cases using the command shell or using shortnames isn't an option. That's a situation I found myself in some time ago. My disks are formatted with NTFS, and I've explicitly turned off "shortnames" for a little bit more speed. I had no way to delete the file I'd somehow created.

I was recently pointed at delinvfile, short for Delete Invalid File, from Assistance & Resources for Computing, Inc. It's a free Windows program that uses standard controls for drives, folders, and files to navigate to the folder and to select the file to be deleted. Push a button and it's gone.

It just got added to my little arsenal of handy tools I carry with me wherever I go.

Article C1907 - March 15, 2004 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

121 Comments
Greg
March 19, 2004 4:57 PM

My friend opened an e-mail on my computer with an attachment that led him to a web site that gave me a permenent virus. I now have files in C:\Documents and Settings\andersong\Local Settings\Temp, there are a bunch I can't delete: ~efd3d2, ~f1d055, ~de46a7, ~df394b, ~efe2. It does not allow me to delete the files, it says "make sure the disk is not full or write-protected and that the file is not currently in use" I am not using it that i know of and i have no idea what the rest means. Please help.

Greg

Leo
March 19, 2004 5:01 PM

You didn't indicate what version of Windows you're running. If possible, reboot into "safe mode" and you may be able to delete the files. *Definitely* get and run a anti-virus program asap.

Good luck,

Leo

John Mansell
June 22, 2004 4:47 PM

A little trick I use to delete files is:

Go into Microsoft Word (yes the word processor) and click then go into the file type and select . Now browse to the files you want to get rid of and delete away. I do not know why this works. But it does.

Enjoy!

stupididiot69er@hotmail.com
August 28, 2004 10:01 AM

I tried this but it didn't work for me I think I have a very special problem....
once I moved downloaded files to another folder, one staid behind so I tried to move it again, than delete it and what I got was 'can not delete the file, this file does not exist.
I tried the tricks and fallowed the links but the file didn't go away. I find it anoying to have an invalid file there that does nothing and won't go away

Kev
September 19, 2004 10:15 AM

I'm having a major problem uninstalling limewire. It will not uninstall from add/remove programs..it just terminates while the unin. is just loading up. Also, when you look at the file size of the installer, its like 4,277 MB.
Very strange.

Leo
September 19, 2004 7:14 PM

I'd head out to limewire.org and see if they have support resources that may help.

bluesky
September 20, 2004 2:44 PM

i have the same problem that the uninstall for LW stops before it really does anything; i had to just delete the .msi + setup.exe files (both ~5MB) as i had a problem w malware at the time. now i want to reinstall it + get error mssg 1714 - older version of LW installed????
have searched for files called lime* + nil shows; have deleted 2 HLKM\\\uninstall keys relating to LW - no joy.
as it's the free verison there is NO online/mail suport from LW.org

Catrina
October 19, 2004 9:34 PM

My sister was using my laptop and accepted a file from a friend. The file happens to be "alyssa's pix.exe" and I can't seem to delete it using your method. This "scary" picture shows up every hour or so... it's getting on my nerves. Any other ideas?

Leo
October 19, 2004 10:01 PM

I'd run a virus scan and a spyware scan right away.

Phreek
October 25, 2004 6:04 PM

As i was passing by, looking for a file deleter, ive seen several problems where users are missing quite an obvious aspect of computing. So i took pity! 0.o

MSconfig - One of the most valuable tools microsoft made :P

Start > Run > Type msconfig

A window will appear, providing you are running windows 98/2000/ME/XP

This tool configures the startup of Windows, and what programs and/or applications start up. Not only can this solve some of your problems, it can speed up your PC greatly!

When in this window, which can vary slightly, from version to version of windows, go to startup, and uncheck any boxes which look suspect. These files will then not startup again.

This will definatly solve Catrinas problem, and posibly some virus problems. BUT definatly get a virus scanner. Also when files you think are not in use, but the message "Make sure the disk is not full or write-protected and that the file is not currently in use" this can be when files are running from startup, so uncheck these files in msconfig.

Be VERY careful when using msconfig, because if you uncheck the wrong things, you may have startup problems. To find out whats safe and whats not, please feel free to contact me on phreek_of_nature@hotmail.com

Just as a little disclaimer here, im not responsible for misuse of msconfig, its just a help suggestions, i advise you use it with care, and if your not so hot with such things, an experienced computing friend.

~Phreek
P.s Before some UbER Haxxor comes along and starts ripping it out of me for being a n00b, im not; just trying to help someone, which im sure is more than what i can say about you!

alex
October 29, 2004 12:32 PM

hi.. I downloaded a game via the internet.. It didn't work, so i tried to delete it but my pc said that it wasn't possible because some program may be using this file.. Then I shut down all the programs but it didn't work, it just said the same thing again.. What should I do..?

berre
November 16, 2004 9:42 AM

Hi, the delivfile program did a fine job!
finaly got rid of those files,
thanks a lot guys

blatta
June 9, 2005 2:34 PM

HELP!!!!!
Can you delete more than one message received at a time?

I don't know if you'll be able to help me or not. On my Sprint PCS phone, I have Short Mail. I've questioned Sprint's Tech guys and they tell me you have to delete these messages, one at a time. I have 270+ messages! I just won't take no for an answer! When I receive a new message, I get notification which I then click "view" and it shows me a url addy. I click "go" and it takes me to my Inbox for Short Mail. I've tried to go to this url, and all parts of it on my computer, but I keep getting the same message, "Application Error, Please Re-login". I've tried from a Mac & PC. Any suggestions?

Thanks!!!!
blatta

Leo
July 2, 2005 8:42 PM

Zando is apparently spyware/adware. I would suggest an up-to-date spyware scan to get rid of it.

MWH
July 7, 2005 12:15 PM

OK..., well i have read all of what the other people are saying and it all makes sense...

I downloaded project and a rom for it off of lime wire!


I know that it is wrong and that is why i deleted it.... or at least i thought.

I realised later that some BAD files were left with it!

I have been working on it now for like a month and i stillllll can't delete it! I have tried MS-DOS and nortons wipe data...
How ever i try to delete it (and I have tried many many ways!) i can;t get rid of it. I know that it is spyware and it is called aurora and nail.exe. I have nortons fire wall and it always warns me that these programs are trying to acess the internet and i always click no, but they always come back trying to acess it... i WILL continue to try to delete it, but whenever i do it says that the program is write protected or something and i am getting VERY DISCOURAGED...

I am sooo confused and i could use all of the help that i can get!

windowsMEsucks
July 12, 2005 8:59 AM

I cant seem to delete this file "ZLT03cd4". It was in my TEMP folder in the C:\WINDOWS folder. I deleted the rest of the TEMP files that were around it because my anti-virus software was detecing that they were all viruses. Its weired because I will delete this other folder and it will keep coming back when I run ad-ware se. HELP Please!!!!

Savvy
July 29, 2005 11:44 AM

The delinvfile thingy worked well for part of what's been undeletable from my recycle folder, yet one file still remains. It was a movie, one I transferred twice. While one of the transferred files would not delete finally did delete with delinvfile, this other one wont.

In normal viewing it seems as if it's a single avi file, yadayada.avi. When I viewed both transferred versions through delinvfile thingy, I saw that each was a folder containing three files, an ico, an avi and another with the avi file for either being only 3 letters long, rather than the multicharacter name the file read through normal means. I could not delete the folders of either so I went inside of each. In one version I deleted eache file individually successfully, and having done that, was able to delete the folder containing them within the recyler bin. In the other folder, still residing in the recycler bin, I was able to delete all but the avi file contained in that folder, and I could not delete the folder either. I have rebooted the computer many times and dealt solely with the recyler bin each time, yet keep getting a message saying the file is being used by another process and refers to the file by the 3 digit avi file name rather than the long name it shows as in the recycler bing.

Using conventional methods, I keep getting a message saying that the file is being used by another process. And while I had this problem yesterday, without using any other software or processes, my CPU is constantly running at 100% and "Explorer", not "IE" is reaching as much as 200MB of use, whereas it's usually anywhere from 20MB to 80MB.

How do I disassociate this file from any other thingy using it, how do I trace what it may be associated with now?

This problem is WASTING MY VALUABLE TIME!!!!!!

HELP!

karl
August 17, 2005 11:19 AM

i cant delete file pkqpxsx.exe and it keeps trying to apply for the internet

Don
August 28, 2005 12:20 PM

I deleted panda antivirus and some of the files are still there and it won't let e delete the files how do i delete them plz help

David
August 31, 2005 8:29 AM

Leo,

You are the man! Short name delete from a DOS prompt wouldn't work. delinvfile kicked its tail. word to the wise, don't download 10-K web pages from the SEC. The filenames and links that are downloaded contain Greek or something worse that are impossible to get rid of without help from Leo.

phil
September 6, 2005 7:37 PM

Leo ur the man! when i read ur top article it seemed to be different from my problem but it wasn't! the posts nearer the bottom were like mine and so i thought perhaps it wouldn't work. all i did was delete any spaces at the end and and dotsand it worked a treat! Leo is the man....long live Leo!

rick
September 9, 2005 11:17 PM

Some how a 5sec mpeg movie clip got downloaded on my computers desktop. But when I try to delete it, it just says its being used by another person or program. It wont even let me rename the file to delete it. PLEASE HELP ME GET RID OF THIS DREADFUL FILE!! I'd really be ever so greatful if you could solve this problem for me. Thanks

Leo
September 10, 2005 9:13 AM

I'd start by finding out who's using the file, and possibly ending that program first so you can delete it normally: http://ask-leo.com/how_can_i_find_out_who_is_using_a_file_in_use.html

IF that doesn't work, I'd try rebooting in safe mode to see if you can delete it then.

If *that* doesn't work my approach would be to boot from a recovery disk or a stand-alone boot CD (an MS-DOS floppy, or perhaps Knoppix if you're at all geeeky, for example) and delete the file from there.

dougie
September 24, 2005 11:07 AM

I want to say "THANK YOU" you have givin me closer to a really bad headache and this prog you forementioned is great a fake spy prog got on my pc and attached to some proccess i could not find for the life of me but one click and puff like magic thank you very much.

Harry
October 8, 2005 6:58 PM

easy way to delete them is just change the name of the folder they are in and delete that folder :)

denis
November 1, 2005 7:46 AM

the delete program worked great thanks a bunch.

Simeon
November 15, 2005 7:57 PM

HI, I installed Nero burning rom CD 3-4 months ago and all of a sudden it stopped working. it was weird because when i tried to uninstall it it wouldn't fully unintall. then i tried deleting the Nero files from the drives. but when i went back to "add or remove programs" it says Nero media player cannot be found and Nerovision Express cannot be found. All i want to do is reinstall the program so i can Burn my movies. please help me...

~Simeon

Leo
November 15, 2005 8:12 PM

What happens if you just try to reinstall?

Reneid
November 30, 2005 9:42 PM

THANK YOU. MUCHAS GRACIAS. ARIGATO GOZAIMASU. And every other way of saying it. I started downloading some partial .avi by mistake and for the life of me couldn't figure out how to get rid of it. Over the years I had found ways around problems like this (such as a few you mentioned) but none worked because right clicking only allowed me to 'send to' and a few other useless options. Since I couldn't rename or simply select and delet it, I tried cutting and pasting it into the recycling bin; didn't work. Tried drag and dropping it in the bin; didn't work. But I downloaded that program, found the file, clicked delete and POOF! Problem solved. You have my thanks, sir.

jim
December 7, 2005 10:06 AM

The SystemFileObject tool in the Microsoft Scripting Runtime component can create folder (and I suppose files) that have trailing spaces on the end, that are impossible to get rid of without the short name trick. Thanks Leo.

Ron
January 15, 2006 5:46 AM

Leo:

i have tried everthing to try and delete this file but to no avail.The message i am getting is "File or directory is corrupted and unreadable" and when i tried the program you suggested a message pops up in my system tray to tell me to run chkdsk and i let it run and it says that there are no errors but the file is still there.
I tried in safe mode and the same thing happens and i tried in a dos window and all is the same.
Usually this would not bother me but it is causing my chkdsk to run at every boot.I also did a search in the registry and it finds the file and i deleted it there and when i restart and do another search in the registry it appears again. Please help if you can.

Alex
February 9, 2006 9:15 AM

Many video files (porn, to be honest) in Limewire end up being invalid files that are impossible to play, rename, delete, etc. once downloaded, and 9 out of the 10 ways I tried to get rid of a file of this kind failed. "Delinvfile" was the lucky charm, it works! Thanks for the spot-on advice!

plasma
March 5, 2006 1:29 PM

ive tried everything, my delete problem is different. when i move the mouse over the file a windows error comes up saying program must shut down, and then "My computer" window shuts down. i tried delvin and it says "error occurred at address" is there any information u could possibly give me to help me get rid of this file? it was downloaded offa limeware, and just refuses to delete. thanks.

Liam Neave
March 24, 2006 4:07 AM

I have an incomplete folder for my Limewire downloads but, for some odd reason, everytime I try to delete all the contents of that folder it appears with a message saying "Cannot delete T1287~1.MPG: Cannot find the specified file

Make sure you specify the correct pathand file name"

This question may have already been asked but what should I do as I need a simple way to delete this?? Please help!

Liam Neave
March 24, 2006 4:15 AM

Sorry I posted that last message. Thanks Leo for the information contained in this page. It was really useful to me. Especially the DelInvFile. This may sound like I am being sarcastic but I really am not doing that. Thanks so much.

HoeHunter
April 12, 2006 1:57 AM

Delete Invalid File, from Assistance & Resources for Computing, Inc. is the hot tip. i had a torrent file, encrypted, and nothing would delete it. it was vexing me, just cause i couldn't remove it, and god bless you leo, and the application you suggested...now i can sleep at night. =P

thank you.

-HH

Notty
May 11, 2006 9:07 AM

I had the same problem this morning...after about an hour i got rid of it ... yay.....go to http://www.purgeie.com/delinv/dldelinv.htm download the darn thing...follow the instructions and it will delete.... it did it for me....good luck

Bill
May 24, 2006 8:32 AM

Thanks, Leo. DelinvFile 2.01 works beautifully. Just cleaned my fileserver.
I was even able to delete folders inaccessible due to user permissions by temporarily giving that user admin access on server, logging in as the user and running the delete folder utility again.
I didn't have to register or reboot!

Rachel
May 29, 2006 7:41 PM

I downloaded what I thought was a pilates program on ares and it turned out to porn. I couldn't delete it, move it, rename it or anything. It was driving me crazy. Finally I used DelInvFile and it worked perfectly so thank you.

James
June 8, 2006 12:17 PM

Damn, this thing is magic. All the other utilities did crap all. This worked perfetly. Thankyou so much.

Jon
June 12, 2006 10:47 AM

yeah, this thing is good...
But it won't delete every thing you want it to. It's strange; I can try to delete a folder, but the folder remains stationary while ONLY the contents are deleted.

Of course, that's only some folders.

Karl
July 11, 2006 11:10 AM

wow the delinvfile program worked great. i tried others and they didn't do a thing. thanks so much for the help!

Bernice
July 18, 2006 7:27 AM

when i try to delete a message i get this (the folder deleted messages is corrupt and can not be reconstructed) oh yes i have a mac can u help me thank you bernice

ntip
August 4, 2006 2:46 PM

I used DelInvfile, but it was still unable to delete the folder Documents and Settings on C (I have installed new Windows on D without format C). It said access is denied. I cannot unset the attribute.

David
August 12, 2006 9:12 PM

I used DelInvFile as suggested by Leo. It worked!!! THANK YOU!

Dave
August 24, 2006 6:30 AM

I read a whole bunch of other help sites on the net, but this one was the only one that actually worked. DelInvfile is a lifesaver. Thanks Leo!!

Harlyn Tucker
August 28, 2006 4:52 PM

I would like to remove links on/in my favorites
file or what ever it is called.

I wish to know how to remove links from my Favorites that I no longer want. Nothing fancy
just point and click. I do not wish to delete
everything. I know how to delete perse,
but not from


m


How do I delete a link or line from MY FAVORITES?
I do not wish To loose the whole listing. I have
some that I no longer require. Thank You

i

"Yosh"
October 3, 2006 5:35 PM

Thank you very much! Couldn't of gone any better. Great tool that really works!!!!!

Spyder
October 7, 2006 5:36 PM

Wow!! Sweet tool. This actually worked!!! Thanks for the info.

Mjolnir1134
October 27, 2006 12:31 PM

Accidently downloaded a file off of a download list in my P2P program. Apparently, the file had an outrageously long file name and Windows XP couldn't delete it for me.

I was brought here thanks to a friendly help site, downloaded the DelInvFile tool mentioned in the article, and it got rid of the pesky file like a charm! Thanks! Nice find by the way!

me
November 19, 2006 1:39 AM

THANKYOU. The program worked when so many others didn't.

Isaac
November 21, 2006 9:34 AM

thanx so much it worked like a charm

Nikos
November 29, 2006 3:46 PM

Recently I had a similar problem. A file with indeed long name. I could not deleted, copied,renamed,.... nothing seem to be done.Not from safe mode nor command prompt with wild cards . It stood there for a couple of weeks. Then I had this idea. I moved all other files I needed to another folder and left only the corrupted one. Then deleted the container folder which worked for me. Renamed the new folder to the deleted one.
P.S. This only works assuming the file is into some folder that CAN be deleted.(not a system one or the root directory).

owen
December 3, 2006 10:52 AM

this thing works.nice

David
December 9, 2006 7:44 PM

Thanks for the tip. I love PurgeIE, didn't know they had this utility. It did what TEN other programs claimed to be able to do, but failed miserably: Delete That Damn File! I love you hard-to-spell DelInvFile.

Marc
December 13, 2006 6:52 AM

Thanks so much, EXTREMELY HELPFUL!!!!

Homer
December 15, 2006 1:16 PM

Thanks for the tip, mate!
Worked like a charm...
The freeware program you suggested deleted a file that I couldn't get rid of!
Thanks

Tim
December 20, 2006 2:41 AM

Wonderful! Thank you so much! I've been agonizing over these files for over a year, and thanks to you I'll sleep a little bit better tonight. :)

Steve
December 28, 2006 11:54 PM

great program, thanks!

Teh_NoN00b
January 7, 2007 7:50 PM

Thanks so much. Really long file name would have been the last thing i suspected with these pesky files from p2p programs, there were hundreds of spaces after the name. Well thanks for saving me!

John
January 7, 2007 8:53 PM

do you get this problem with Mac computers ?

Gerhard
January 20, 2007 7:14 PM

great hint to delinvfile. found before a lot of really weird tips how to delete however this little thing s perfect. got myself a license to be prepared for the next case. tx leo

Bertelsen
January 21, 2007 10:23 AM

Wow! I was in that unlucky situation that ive got a virus from a email that placed 3 pictures on my Desktop with invalid names, which i couldn't delete. I searched a little on google, and then i found this. I read about it and it did sound like a program that could solve my problem. I downloaded it and tried it out. It worked! I had tried like 3 other programs such as Dr. Delete. Same message from there: Invalid filename. But now it's gone! Thanks for the tip!

Jizzymuck
January 21, 2007 8:09 PM

You're the best. Downloaded delinvfile, and it worked like a charm and did the trick. Was getting a little worried, glad I found ya and used your advice. Thanks

NoMoreLimewire
January 26, 2007 3:18 PM

I downloaded a file from limewire that had no valid extension, would not allow me to see its properties, and would not open. Obviously, it also did not allow me to delete it. I downloaded this software, and I was able to easily get rid of the file. Thank you so much, you really came through!!

Joan
February 3, 2007 2:28 AM

I had 2 jpeg files that would not delete. I just deleted them with delinvfile program and it worked! Thanks for the help.

Valerie
February 5, 2007 5:13 PM

Thank you!! I've been trying for months to get rid of these 3 files my nephew downloaded when he visited & nothing worked until I tried this. Thank God they're gone (& next time he visits I'm hiding my laptop!)

rick
February 21, 2007 2:25 PM

I had a JPEG image which was downloaded from a program to my desktop and I could not delete it.I even right clicking it did not give me the option to delete or show properties.I tried deleting the file through the search option but it did not do anything.I have also tried other ways suggested by
information on bulletins.Then I found this,tried it,sure enough it worked.Thank you for this program and for helping others with their pc problems.

Eric
March 1, 2007 10:05 PM

Tried multiple free ware applications and your recommendation worked like a champ. Thanks!

Marie
April 1, 2007 8:03 PM

Yippee!! I finally got rid of that pesky file that has been bothering me for months. delinvfile did the trick.

javier
May 10, 2007 9:51 PM

way to go! this program saved me a lot of trouble deleting a video file, thanks for the tip leo.

Bart
May 12, 2007 7:35 PM

Thanks Leo! I went through about half a dozen other tips before coming across yours. It worked like a charm the first time.

Eric
May 15, 2007 6:08 PM

Utility didn't work for me, still searching for a solution.

Glyn
May 23, 2007 12:48 PM

Excellent. I've had a file that just would not go. Delinvfile did it straight away without any problem.

Thanks.

LARRY
May 26, 2007 4:42 PM

I downloaded to jpeg files from limewire and they will not rename or delet no matter what I try is this whay I should use I tried the free version it I cant figure it out or get it to work I NEED HELP!

Matt
May 28, 2007 8:27 AM

I hate repeat what everyone is saying, but this is a really great little app. I tried several solutions including using the command prompt to delete the file using a short name, but nothing was working. This program is absolutely fantastic, where on earth did your friend find this?

pSyClone
May 31, 2007 11:29 AM

Thx alot!! It worked like a charm!! ;)

angus
June 5, 2007 4:39 AM

WOW
great proigram that can delete anything!
thank you so much for this!

Jim Lawler
June 9, 2007 9:58 AM

Just a note for your many readers.

I recently released DelinvFile 3.01 which includes a "Scan" function. You can now search for invalid file names, invalid folder names and too-long file+path names.

The new version can delete a greater variety of invalid files and folders than prior versions.

Note that DelinvFile is no longer a free program but that the original delete functions and the new Scan functions are free to use. Registration is only required for advanced functions.

sharon
June 17, 2007 7:45 AM

Thankyou for your tip and link to DelinvFile. After all avenues were exhausted (for a computer illiterate), the easy to use software deleted those stubborn files, and actually saved my sanity. Its like a load was lifted.

with so much conflicting advice regarding those files that resist moving, renaming, deleting, and after installing several deleting programs that didnt work, I am glad I perservered and found your site.

thanks again Leo

your blood is worth bottling.

s.

Kris
July 18, 2007 1:20 PM

THANKS! Very Helpful!

Jo
July 23, 2007 7:34 AM

totally awesome !!! thanks mannnn...what would the world be like without people like you!!...
also, to Larry (about limewire)..the same thing happened to me, and this program fixes the prob really easily :D..

Thanks again!

xXx

Ryan
August 6, 2007 6:34 AM

delinvfile really helped me. It deleted a file that I can't get rid of. Thanks a lot.

james
September 23, 2007 2:23 PM

Really good little App! Worked a treat on dodgy limewire files and such. Specially long name ones just use Short Name delete!

James Blevins
October 12, 2007 10:58 AM

Thank you so much for this information! I had transferred a folder from a Mac to our Windows 2003 file server. Unfortunately, somehow the folder name got a trailing space at the end. The result was that the folder had no permissions tab. Whenever I opened it, as soon as Windows Explorer had loaded file information, it would close. I tried to access the folder via a command prompt, but it told me the file was not found. Using tab completion, I noticed that there was a space at the end of the folder name, "My Folder ". Based on the information you provided, I tried the following: I opened a command prompt and went to the containing folder. I issued the command, rename myfold~1 "My Folder". Viola! It's all better now! Thanks for pointing me in the right direction.

outcode
December 18, 2007 9:07 AM

This program may work for some, but for me it's completely useless. You aren't allowed to select the Desktop to delete a file and the problem is the file I need to delete is on my desktop so I have no use whatsoever for this tool. Complete waste of time.

Derek
January 15, 2008 9:35 PM

Thanks for the tips. They gave me enough help to be able to delete a series of directories that had names consisting only of spaces! Worryingly these were in an old ftp root directory.

marctowler
March 4, 2008 3:51 PM

err, yer! This software does jack for my problem. It doesn't find the problem file at all. I can't delete a file using ANYTHING so far. Five programs in and still got it sitting there in My docs folder. THIS PROGRAM NOT GOOD FOR ME THEN!!!!!

Roger111
March 24, 2008 3:50 AM

I’ve been using the following tool that resolves the problem with trailing spaces or other unsupported characters in filenames. It is not free, but comes with samples and working code. It saved so much of my time!

http://www.abtollc.com/products.aspx

Gan
June 17, 2008 7:43 AM

Finally! Those two folders have been sitting on my desktop for a few months and I can finally get rid of them! Thank you!

Rich
June 22, 2008 10:19 AM

Malewarebytes [free anti-spyware from the usual download repositories] has a 'FileASSASSIN'- which would work well here. In fact, I'm mid way through clearing up a dozen such uncooperative files. Thanks for your leads too. What on earth crawled up those people who posted above? Phew! You'd think you told them to invest in SubPrime.

Keep up the good work, Leo.

R

feri
June 26, 2008 8:49 PM

Thanks, but how to make the different way ? imean I want make some autorun at usb flasdisk wich is can't be delete or even format it.

Could you help me to give some advice

Thanks

Larry
July 15, 2008 9:13 AM

Thanks for the infomation, should update your info, program is not free, (DelinvFile) Hate to spend that much to delete just one file. Some good info on your site.

Brandon
August 12, 2008 10:01 AM

After alot of pain this worked for me for a file on a CD with a trailing space.
1. dir /x
2. Find short filename for messed up file, Ex. "PLATT~92.QXD"
3. xcopy PLATT~92.QXD c:\quark\test.qxd /N
4. Now the file is on your drive with a valid name that you can change to what you need.

Hope this helps someone.

Shameer G.D.
August 22, 2008 11:01 AM

Ok people,
wanna share with you how i got rid
of that stubborn obnoxious piece a crap.
The stubborn file i had was ones with :

^**@%@%#$^$#&#$&#$^%@%!@!$ crap like that
and they were more than 200 characters long.

I know how annoying and frustrating it is to have that
crap sit there like a statue, when you want it gone. Tried for
close to 8 weeks figuring out ways to remove this thing,
tried everything on the web not just google,
yahoo, msn literally EVERYTHING.Actually i'm not
too sure if reformating works , but i didnt reformat
because had too many files backedup and had
no place for extra storage.However none of the above methods,
worked.All the information in the forums
like using the commands to delete,renaming,delinvfile or any other
things didnt work for me.Infact i know how troubling
this is , i wanted to help everyone out there.

Here's what to do:
1)download unlocker : http://ccollomb.free.fr/unlocker/
unlike the other softwares i tried, this virus free software
is FREE and most importantly IT DELETES THE CRAP.

2)After installation, right click on the file you wanna delete
press unlocker,and when it launches, there's a small tab at the lower
left of the menu, which allows you to choose delete.
Click delete.
It will say file cannot be deleted, system has to restart to delete the file.
What it actually means is that file wont be deleted on the spot,
you need to restart in order for it to be gone, SO DONT REMOVE UR HARDDISK!!

3)When you're about to restart DONT REMOVE YOUR EXTERNAL HARDDISK,
DONT END ANYTHING, LET THE COMPUTER DO IT'S THING, JUST
RESTART UPON DELETING THE FILE FROM UNLOCKER,

4)Check if the file's deleted upon restarting
ONLY AFTER EVERYTHING'S DONE PROPERLY, AND FILE'S DELETED, REMOVE UR HARDDISK SAFELY!

5)Enjoy and heave a sigh of relief :P

Hope this helps someone :), all the best!!

Oh and by the way unlocker helps alot in terms of
like say you have trouble removing your external harddisk.
Say if you're in a hurry and need to catch a bus, but your harddisk just
cant be safely removed, unlocker
helps you to close all programs, just unlock all, or kill all processes.
Follow the same procedure, at my computer, right click on the drive you wanna end safely,
and then click unlocker. Then just unlock all or kill all processes.

That would come handy after you have disabled this 2 functions
that maybe allowing explorer to access all your external harddisk
files thereby preventing safe removal.

GO TO CONTROL PANEL:

1)Under classic view, go to back up and restore,
Click create a restore point at the left hand corner,
uncheck all the boxes under available disks and click
ok/apply.

2)Under classic view, click indexing options, then,
modify, than check if all boxes are unchecked.

With that said, next time when you wanna remove your
harddisk safely, also not forget to make sure you have all the
windows closed, and you're facing only your desktop.


Oh yea and by the way if it works, you can thank me at [email address removed] :):) ciao!!

Regards,
Shameer G.D.

Julian Lockhart
August 26, 2008 10:49 PM

NICE!
Worked like a charm.

Michael
September 6, 2008 7:06 PM

Unlocker worked like a treat!! Tried lots of other methods over a few weeks but unlocker did it! Thanks Shameer!!

Tom
October 4, 2008 9:13 PM

Error Deleting File or Folder

We all have had the experience of seeing the Windows Error Deleting File or Folder – Cannot delete : It is being used by another person or program.

If you are unable to delete a file or folder when the only program running is Windows Explorer, the Windows application Explorer is usually* the program at fault. Explorer since day one has had a problem with releasing file locks but, you can use the following manual procedure to delete any file or folder.

You must be sure the file or folder you want to delete is not needed by either the operating system or an application. If you are unsure you can use the program Process Explorer to determine which program process has a lock on the file or folder. You can download the program for free at the www.sysinternals.com which, re-directs you to the Microsoft TechNet website http://technet.microsoft.com/en-us/sysinternals/default.aspx. After installing Process Explorer you can use the Find menu then select the File Handle or DLL option (ctrl-F) and type in the name of the file or folder name and learn the name of the program preventing the file or folder deletion. In any event, Process Explorer is a good addition to your toolkit.

So if you’re ready to get rid of that pesky file or folder print out the following instructions:

1) Close all applications and open Windows Explorer (if you were unable to print out the instructions leave the application with the instructions open and use the ALT-Tab to toggle between applications later when we stop Explorer)
2) If you don’t have the Address toolbar active in Explorer go to the View menu click Toolbars then click Address Bar
3) Locate the file you want to delete and click on it OR to delete a folder locate the folder containing the folder you want to delete and click on it
4) Right-click in the Address toolbar box and select Copy which copies the drive and pathname to the Clipboard
5) Close Windows Explorer
6) Press the Ctrl-Alt-Del keys simultaneously to open Windows Task Manager
7) Click on the Processes tab
8) Click on the Image Name column to sort the processes running alphabetically
9) Find the Explorer.exe process and click on it
10) Click the End Process button
11) Click the Yes button In the Task Manager Warning message box
12) Click on the Applications tab
13) Click on the New Task button
14) In the Open box type the letters “cmd” and click OK to open the command interpreter
15) Type the letters “cd “ (the letters cd followed by a space) and right-click then select Paste and press Enter (this will change the directory to the directory we copied from the Address toolbar)
16) Type the letters “dir” and press Enter (this displays all the files and folders in the directory)
17) Locate the file or folder name you want to delete (use the scroll bar if this is a directory with a lot of files)
18) Right-click anywhere inside the window and select Mark
19) Left-click on the first letter of the file or folder name to highlight the first letter
20) Hold the shift key down and left-click on the last letter of the file or folder name (the whole file or folder name should now be highlighted)
21) Press Enter (this will copy the highlighted file or folder name)
22) To delete a file type in the letters “del “ (the letters del followed by a space) or to remove a directory type in the letters “rd “ (the letters rd followed by a space)
23) Right-click and select Paste
24) Press Enter (this will delete the file or remove the folder)
25) Type in the letters “exit” and press Enter to exit the command interpreter
26) In the Windows Task Manager click on the New Task button
27) Type in the letters “explorer” and click the OK button
28) Close the Windows Task Manager

I noticed mention of software here that could remove these files automatically. Unfortunately they seem to require the system to reboot and in the case of Malewarebytes 'FileASSASSIN', it doesn’t work when Explorer is the process that is keeping you from deleting the file. I’m so used to doing the above procedure that I could delete the file in the time it takes Windows to shutdown let alone wait for Windows to start.

*The above procedure has worked for me 100% of the time for deleting files or folders when a registered process controls the file. The only time I was unable to use this procedure was when a “malware” program had control of the file I was trying to delete. At that time I had never heard of “malware” and I was in the process of manually detecting and removing what I thought to be a virus, trojan or worm which was attacking my system. I never use to use virus or worm prevention software because they are such resource hogs and they can cause many other problems. I’ve since found out the anti-virus software I renewed was worthless against “malware”, but not until I renewed the expired license, that came with the computer. After renewing the license I used the software to scan for viruses, worms and Trojans: the software found none. Meanwhile, it was getting just about impossible for me use Internet Explorer. After some painfully slow research I learned my computer was infected by a “malware” program, which led me to the free version of the program, Malwarebytes' Anti-Malware. With much trepidation, I downloaded the free version of the program and installed it. When I ran the program it found the registry entries and infected files and removed them. Ironically, the malicious programs that Malwarebytes found were Trojan.Vundo, Trojan.BHO, Trojan.Agent and Rootkit.Agent. So much for protection the virus protection I paid to renew!

In the process of writing this I ran the malware program to look at the history and checked for updates. When I let the program update the definitions, my virus protection software wouldn’t let one of the files download because it detected a Trojan named Generic.dx in the directory of the Malwarebytes program directory while the update program was attempting to copy files.

That’s just great, now I’ve got an Anti-virus vs. Malware software war brewing!

There’s a reason I kept this stuff off my system all these years.

I hope you find this procedure as useful.

Tom

Tom
October 4, 2008 10:47 PM

In my previous post I forgot about file names and folder names with imbedded blanks that need to be enclosed in double-quotes. Replace steps 22 and 23 with the following:

22) To delete a file type in the characters del “ (the letters del followed by a space and a double quote) or to remove a directory type in the characters rd “ (the letters rd followed by a space and a double-quote)
23) Right-click and select Paste and then type the character “ (double-quote) the fully constructed commands look like - del “file name.ext” OR rd “folder name”

Sorry for the over-sight. I think I could use a good a QA person.

Tom

Khentiamentiu
October 14, 2008 12:35 PM

Removing a Windows file is easy, once you figure out what the file is and where it is located. I use this procedure all the time for my wife, who is unwilling to learn a different operating system.
1. Boot the system from a CD with a live Linux distribution such as Knoppix, Fedora or Ubuntu.
2. Mount the Windows filesystem in Linux, which has no problem reading and writing Windows filesystems.
3. Delete the file with the command "rm ".
Of course, it's not quite that simple, and you need to know that removing the file won't corrupt Windwos so that it won't run, but once you learn a little Linux, it's easier than all the crap you have to go through trying one program after another in Windows. Or you can avoid these problems entirely by using Linux, which these days comes with extensive driver support, easy installation, and an OS more stable and faster than Windows. Oh, and it's free for download, of course. Some very good distributions are Knoppix, Fedora 9, Ubuntu 8.04 and OpenSuse 11.0.

Bikesh
December 16, 2008 9:23 AM

oh God,, there are 100 comments for this Post. I do not think my comment would matter much,, haha,, But wow thanks for solving my problem..And I must say I discovered a new tool .. wow it works great,,

Geoff
February 4, 2009 9:00 PM

Read all the comments (on this and other websites) and can't find mention of this solution. Reboot in Safe mode - use Explorer to go to the file, select and delete. This has always worked for me!

Steve Crye
February 26, 2009 9:09 PM

HHOOOORRAAAY!!

Unlocker WORKED!. After weeks and weeks of struggle - and I am not a newbie when it comes to Windoze crap. MOveOnBoot did NOT work, unlocker did! I'm sending him a donation!

Steve

rachel searles
March 4, 2009 5:56 AM

cant find it in my add and remove to delete it out please help me delete this from my sytem

adex
July 7, 2009 3:12 PM

When I go to 'folderoptions'...oin school or home computer, I find out I cant change some files function its like it cant be highlighted what makes some commands unable to be highlighted?

Ron Richardson
November 9, 2009 4:21 PM

My problem was that with my file buried about 15 folders deep the combination of these folders and the file name they combined exceeded the max file length. I just had to rename the folders to something short until I got under the max length and then I could erase that file.

Haikal
November 10, 2009 4:24 AM

Unlocker worked!! :D

Brian
November 11, 2009 10:40 PM

I have figured out that by corrupting the file it will delete. I corrupted the file by opening it in Notepad and then deleting some of the characters. I may not work with all files but it worked for me on a video file.

Dhruv
December 13, 2009 10:32 AM

Sir,
In my laptop Operating system is windows XP.
When i change my operating system windows 7,i can't delete that Windows Xp file.
What I Do????

Depends on how you "change my operating system to Windows 7". A reformat and reinstall, my recommended approach, removes XP completely.
Leo
14-Dec-2009

Egbert
December 31, 2009 1:24 PM

Well Leo, a final comment at the end of this year (2009). It seems that your blog is so populair, that when you point out a nice freeware tool like delinvfile, the respons is giving the creators some dollarsigns in their eyes. The same tool now sells for USD $ 26,95. So this freeware has become 'be aware'-ware. Unlocker v1.8.8 is still free (and works on Vista) and I also use Eraser for secure wiping.

Eggy
March 21, 2010 5:31 AM

I had a file on my computer that was most likely the result from a corrupted downloaded file which I could not delete (my system locked-up in the middle of a download and I had to restart the PC).
I tried changing it's name, tried changing its attributes (read only). I tried to delete it using command line but I kept on getting "File can not be found" messages even though Windows attributes showed it to be 15.7 MB, it seemed as if nothing would work.
Then I came upon someones suggestion to download Ubuntu (8.04) and burn the iso to cd and create a bootable CD version.
I did and then restarted my PC into Ubuntu and from there went to "places" and found the file I wanted to delete. I sent it to Ubuntu's trash and then emptied the trash and my problem was solved.
A simple and FREE solution to a frustrating problem.

ismo
April 5, 2010 7:39 AM

sir
i had a photo impact 12 i created a files with UFO extensions and know i cannot delete these files .... my computer's windows is win 7

when i tried to delete these files the delete process hanged then i see a window with three choices ... they are ( close window or keep working or .....)

what can i do ?
please somebody help me!!!

Ronald D
April 22, 2010 12:10 PM

I have used Unlocker tool at [broken link removed] to delete files that was locked.

Sean
May 25, 2010 10:50 PM

Leo and Co.

You can also use the "Process Explorer" from Sysinternals to kill the DLL/Handles. I had a Zip archive that refused to be deleted because the handle was frozen. I killed it, and away it went! All you have to do is search for it.

Bob
July 16, 2010 4:39 AM

I remember a problem I had many many moons ago.
A game I played under DOS asked you to name your saves, and once just to see what happened, I named the save "ha ha ha".
This caused immense problems, because the game actually called the file that, and DOS would read as far as the first space, and stop.
So, DOS couldn't find the file. So the game couldn't find the file. And the file was undeletable (because DOS couldn't find it).

Jackie
October 26, 2010 11:31 AM

LONG PATH Tool provides a powerful and highly versatile solution to copy and delete files and folders with long paths. You can test out a fully functional version- free trial.
http://www.longpathtool.com/index.html

jangadbutta
January 12, 2011 8:23 AM

Instead of using obsolete solution from www.longpathtool.com, you'd better visit the website of original manufacturer - www.pathtoolong.com - to download the latest version of Path Too Long.

Joe
February 10, 2011 9:59 AM

Being a Realtor, I'm used to typing abbreviations for things like St., Dr., Rd., etc. Well, after two years of trying to delete a file I noticed the "." at the end. This was the reason it would not delete as windows was looking for something like "com or exe" after the "." and never found it. Went into DOS, renamed the file, and it deleted just fine after that. Be careful of the evil "."!

Robin
February 17, 2011 2:21 PM

I have cracked this challenge for, say, "MyFile.doc ", by using
C:\ReName MyF*.* MyF*.doc

But BEWARE !

I had a file rid of which I COULD not get. It was at the end of a long path, with no other files, but I just COULD not delete it.

One day I set to, and eventually succeeded.

Alas.

For it was cross-linked, and I lost my entire MyPictures folder, and CHKDSK converted the contents into SEVENTY THOUSAND separate files !

I still have that hard disk untouched since then - does anyone know how I can retrieve any of the files ????

sean
December 20, 2012 1:52 AM

Thanks, Leo....
I had a problem with a file which i couldn't delete. A file that makes my processor to work slow. By following your instruction, the file has been deleted and my problem has been resolved...
thanks again dude!...

Randy Baker
March 24, 2013 9:34 PM

omg thank you so much!!!!!! i had a little 42k file and ive tried everthing! i downloaded DelinvFile from http://www.purgeie.com/delinv/dldelinv.htm and it worked .

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to http://askleo.com/ask to ask your question.