Solved: “Cannot read from the source file or disk”
I’ve finally solved a problem that’s been bugging me for years. One of our file shares ended up with several undelete-able files. Attempting to delete them results in “Error Deleting File or Folder – Cannot delete file: Cannot read from the source file or disk“.
Note: Windows 7’s version of this message is something like:
Could not find this item: This is no longer located in C:\Blah. Verify the item’s location and try again.
Even going to the file’s properties to check permissions presented a very blank properties dialog. And a CHKDSK didn’t sort thing out either.
It turns out the problem was: the filename ended with a dot, e.g. it was something like “C:\Temp\Stuff\Sales Agreement.“. As far as Windows is concerned this is an invalid file name: so although it gets reported in a directory listing, the standard Windows APIs for manipulating files subsequently deny its existence.
So how did this file get created in the first place? The answer: a Mac. The file was on a file share which had been accessed by a Mac user. Macs tend to write all sorts of metadata to extra “._DSStore” files and suchlike and had left this file behind.
So if Windows doesn’t appear to allow these file names, how did they get to be created? Well, it turns out that NTFS allows all sort of file name/path weirdness that Windows, or specifically the Win32 API, doesn’t allow. For example, NTFS actually allows file paths up to 32K but Windows restricts file paths to no more than 260 characters (MAX_PATH). I suppose this is all for DOS/Windows 9x backwards compatibility. As these files were being accessed over a file share I guess the usual Win32 checks are bypassed.
But thankfully you can get Win32 to ignore these checks by prefixing your file paths with \\?\, (ie. C:\Temp\SomeFile.txt becomes \\?\C:\Temp\SomeFile.txt) which I discovered after reading this blog post about long paths in .NET.
So at a command prompt (Start > All Programs > Accessories > Command Prompt) I was able to delete the file using:
del "\\?\C:\Temp\Stuff\Sales Agreement."
Note: On Windows 7 it seems you can just use wildcards without the
\\?\trick to delete the offending files: e.g.
del c:\temp\somefil*
If it’s a folder/directory you’re trying to delete use the rd or rmdir command, e.g.:
rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder."
Tip: as you’re typing the file/directory name use the TAB key to auto-complete the name (press TAB repeatedly to cycle through possible names).
Of course the corollary of all of this is that you could really annoy somebody by doing this:
echo Hi > "\\?\%USERPROFILE%\Desktop\Annoying file you can't delete."
But you wouldn’t do that would you?
443 comments so far
Leave a reply

At the end of reading this, I actually glanced over to the side of my desktop to see if there was a file there called ‘Annoying file you can’t delete.’ It was entirely involuntary. Clearly on a subconscious level I have deep trust issues.
HI
Im getting the below error message
“Cannot delete file: Cannot read from source file or disk”
C:\>del “\\?\C:\Documents and Settings\TEMP\Favourites\bò┌ⁿ8g¼o.╦╧∞”
The system cannot find the file specified.
C:\> rd /s “\\?\C:\Documents and Settings\TEMP\Favourites2|ì>⌡ƪ.▄rî”
\\?\C:\Documents and Settings\TEMP\Favourites2|ì>)ƪ._rî, Are you sure (Y/N)? Y
The filename, directory name, or volume label syntax is incorrect.
I tried thru Unlocker, but no results. pls help.
Thanks
Jasm
hi, you better try this:
del “\\?\%USERPROFILE%\Desktop\[copy and paste your annoying file name]”
hope it works.
cheers!
Praise be to those smarter than I am. That file has been a blight on my desktop for weeks but it just now started bothering me to the point where I was moved to try and find an answer. Thank you!
ditto.
The internet is a wonderful place
Hi,
I am experiencing this same error in MOSS but when I try to rename a file through the explorer view of a document library.
To let you know, the file has a ‘+’ character, was brought into MOSS through drag and drop in the explorer window and is also part way through a workflow.
Not knowing the origins of the document can I assume that this is occuring due to the same reason?
Thanks,
Alex.
INTRIGUING.
Thanks for the heads up on that Duncan.
I’ve inherited a bunch of files ending in “.” and had no idea how to get rid of them, and now this simple and elegant solution. Thank you very much, Duncan!
A good solution to the problem, certainly, but you have to be a pretty major ms fanboi to call this ’simple and elegant’ instead of ‘a crappy problem that should’ve been fixed at the api level ten years ago’.
Sweeeeeet! Worked like a charm. I had tried booting in safe mode and deleting, MoveOnBoot, and toying with permissions, none of which worked. The files did indeed come from a Mac and in my case it wasn’t a period on the end, but something that looked like a space. I highlighted the name of the offending file, copied it, got in the command prompt window, typed your command, (del “\\?\C:\folder name\sub folder name\), then right-clicked to get the paste function in the command prompt window and typed the close quote. That way, no matter what the offending character is, there’s no guess work. Thank you!
I know this conversation is over a year old, but I had to reply: Tech Guy, you are a genius. I used your copy/paste idea, and the offending file is gone! Thank you for sharing.
OH MY GOD, THANK YOU!
Very helpful! Glad I found this via Google. My problem was a folder name generated by a program. I tried to move it, rename it, etc — no dice. In my case the last character in the name appeared to be a space. I couldn’t seem to rename it with this trick (got syntax error – sorry, I didn’t record exact error message). So I copied the contents into another folder, and then deleted the bad folder ( rd “\\?\c:\folder\folder\bad name”). It went away. Some where in some manual the exact syntax rules of these DOS commands is documented, I’m sure.
Oh, and I couldn’t resist trying your evil suggestion. Yes, it worked on my (Win XP NTFS) system. And the same method deleted it. There may be some hacker potential for this method of creating (practically) undeletable files.
Great! It worked like magic. Thanks. :-)
ok so im not very computer savy and i still cannot get a file on my desktop to delete it gives me this same error
In addition to this you can try reading this:
http://www.softwaretipsandtricks.com/forum/windows-xp/32482-error-message-cannot-delete-file-cannot-read-source-file-disk.html
This is unlocker(it’ll do the job without having you type in names check it out!): http://ccollomb.free.fr/unlocker/
I would just like to thank you Lindsay for posting this information on the program Unlocker! It deleted that annoying file right off of my desktop with easy! Thanks Again Lindsay!!
Trojan virus detected on unlocker
Well I just came up here to thank Lindsay too for posting the link to this marvelous program, Unlocker, which has worked like a charm on some immovable icons that have been bugging me all year. But here I see Tim is telling us that there’s a Trojan virus on it :/
Is this true??
Or is he fear mongering?
tnx a lot^^ the UNLOCKER did remove the 2 files on my desktop. i have tried to delete these 2 in command prompt but it just cnt be deleted there. the commnd prompt did delete my other files in my desktop.
just for a history, these 2 files appeared after i cleaned my hard disk. actually, i have deleted these 2 files already. they r torrent files and has a long file name and a SPACE. i just dont know which of these four made them appear again in my desktop.
1. registry mechanic
2. pc doctor
3. ccleaner
4. purera
and the reason why i cleaned my hard disk is bec. the windows update just downloaded every update and filled my harddisk.now i turned the automatic updates off.not sure if it is a good thing to turn it off.
-THE END-
I would also like to thank Lindsay for posting the link to unlocker. It did NOT have a trojan like another poster said.
It could not unlock the file, but gave me the option to delete it anyway.
Thank you, Thank You.
Nick
Thank you. Very much.
I just wanted to thank you for posting this. It helped me get rid of an annoying file on my desktop :)
Thanks. I had a file which i think was some kinda deleated download which i couldn’t remove, but this worked.
So I have little experience with command prompt. How exactly do I go about prefixing the file path to the file I want to delete?
doesn’t work with Win XP SP3
great! thanks.
@Lindsay George the unlocker program worked for me, thanks.
Good lord, thanks for this. I tried ALL the other things, and this is the only method that did it. In my case, it was a space at the end of too-long filenames.(It worked even though I have SP3!)
Perhaps these WERE a deliberate trap…
I had this annoying die-hard folder with a space (or some invisible non-ANSI space bizzo) at the end..
After trying a hundred things, that “\\?\” thing was just the ticket. Thank you!
Hi, I’m not really sure how you put your solution into the command prompt, because every time I do, it says that windows cannot find ‘del’.
Can you type exactly what I’m supposed to type? The file location is: C:\Documents and Settings\Owner\Desktop\Maddie Bailis
It’s driving me nuts!
Wow!
Never mind! It worked! I just put in the wrong thing.
Thanks!
Finally!
I had been searching all of Microsoft Knowledge Base and the whole web for a solution to this, with nothing but “Contact Microsoft support”.
This here worked!
Thank you *very* much!
Please note that the word “Solved” in the subject header caught my eyes within the millions of search results that state the same question but have no answer. So another thank you for helping me to get here!
Thanks. Worked the first time. It was smart thinking to use the word ‘Solved’ in the Header.
Jason, and all others who may be running XP with SP3, I found a possible solution as well.
From the command prompt, navigate via dos commands to the directory containing the offending file/folder.
Now type dir /x/a
This will show you the old 16 bit 8 character dos name for the file or folder.
Now type del 8characterfilename /ah
Not sure if the /ah is needed but this worked for me. I hope it helps =] Good luck to you all!
Thanks Keith, that worked perfectly.
What if the offending folder is located on another drive? (D: in my case, cmd won’t navigate to it)
Nevermind, found the solution! Navigate to C:/WINDOWS, then just put d:, so it looks like C:\WINDOWS>d:
Thank you, thank you! :-D
Brilliant! I couldn’t get the original method to work but this worked perfectly first time, thanks :)
Thanks Keith, an hour of experiment through this article got me happy ending… you made me close this window, with a smile on my face.
hi
Im desperate..i’ve tried everything but this thing won’t go..I’m not good in command pro so i can’t figure out what to do..
The folder i’m trying to get rid of has the following name:
[snip]
With the dot at the end and it’s located in C:\Documents and Settings\Vasssos\My Documents\Downloads
Any help will be much appreciated!
Thanks in advance
vasssos
@Vassos: at the Command Prompt type:
del "\\?\C:\Documents and Settings\Vasssos\My Documents\Downloads\rest-of-your-path-here."Note you can copy and paste text to the Command Prompt also, which will help.
hey
thanks for the quick reply.
I tried what you said but i get “The system cannot find the path specified” even though i can see the folder when i type in “dir”
@vassos: One thing that may help is to use the TAB key to auto-complete the file path for you. Type the following (note the \\?\ at the start):
del \\?\C:\Documents and Settings\Vasssos\My Documents\Downloads\
…then press TAB until your filename appears, when it does, press ENTER.
This Worked for Me !!!
Many thanks Duncan.
Still no luck.
Note: This “thing” appears to be a folder. I don’t know if it makes any difference on the command for prompt.
Thanks again
@vassos: try using ‘rmdir’ instead of del.
1. in dos, navigate to the directory of the offending folder
2. dir /x/a to get the 8 character name of the offending folder
3. rmdir [your 8 bit filename]
@ben
Thanks ben
I tried that but I get the following:
“The directory is not empty”
Holy Snap! It worked!
Thanks.
awesome! finally got rid of that thing :/ many thanks! :)
thankyou so much! I had no idea how to get rid of a file I had partially downloaded and the cmd line worked perfectly first go
can anyone tell me how to prefix my file path? Every time I type the command in DOS I get could not find and I have absolutely no idea how to add the \\?\ prefix to the path.
@vassos
I had the same problem as well. There were folders under the top level “bad” folder that I had to delete first before I could do these steps.
1. So, in Windows, I had:
c:\myfiles\badfolder\stuff\morestuff.
2. I deleted the “morestuff” and “stuff” folder in Windows just fine, but I couldn’t delete the top level folder (it had a space in it).
3. Once I deleted the subfolders and all that was left was c:\myfiles\badfolder, the suggesions that Ben had worked.
4. I used rd instead of rmdir, but it shouldn’t matter.
Hi… I’m trying to delete the following filename “The Gate dvdrip(ironeddie)Divx[1].avi.”
Here’s what I’ve done in Command Prompt so far.
Directory of C:\Documents and Settings\Desktop\Maps
10/06/2008 04:37 PM .
10/06/2008 04:37 PM ..THEGAT~1 The Gate dvdrip(ironeddie)Divx[1].avi.
09/22/2007 02:13 PM 0
10/05/2008 04:23 PM 21,661,580 Thumbs.db
2 File(s) 21,661,580 bytes
2 Dir(s) 17,562,890,240 bytes free
I tried every reccomended method of deleting the file as described here to no avail. I Know I’m getting the file name right because I’m using the tab key.
Guess my question is what exactly should I type in from C:\ (at the very beginning) to delete this file with the dot at the end? When I try to preface a path with \\?\ it says the following.
CMD does not support UNC paths as current directories.
=(
Exactly what’s been tried thus far…
C:\>del \\?\C:\Documents and Settings\Desktop\Maps\The Gate d
vdrip(ironeddie)Divx[1].avi.
The system cannot find the file specified.
C:\>del \\?\C:\Documents and Settings\Desktop\Maps\”The Gate
dvdrip(ironeddie)Divx[1].avi.”
The system cannot find the file specified.
C:\>del “\\?\C:\Documents and Settings\Desktop\Maps\The Gate d
vdrip(ironeddie)Divx[1].avi.”
The system cannot find the file specified.
Thanks man! You’re a lifesaver…
Why does “iexplore.exe” download automatically from this page?
A brilliantly helpful clue .. that almost worked!
My files were hidden system files as well.
What did work was replacing the dot with a wildcard in the filename, so this is what worked:
del /ahs CAODIZOX?
/ahs allows deletion of Hidden System files, and ? substituted for .
Thanks, this one from Martin did it:
A brilliantly helpful clue .. that almost worked!
My files were hidden system files as well.
What did work was replacing the dot with a wildcard in the filename, so this is what worked:
del /ahs CAODIZOX?
/ahs allows deletion of Hidden System files, and ? substituted for .
XXXXXXXXXXXXXXXXX MARTIN’S tip was the last piece of the puzzle I required in addition to the main blog XXXXXXXXXXXXXXXXX
THANKS MARTIN AND DUNCAN (the blogger)
Thank you for the tip! I was able to get rid of these pesky files thanks to you!
So not everyone is a DOS guru, how do you prefix a file path? Guys who keep posting saying “wow this worked, thx dewd!!!” how about telling us non-command line savvy folks exactly how you got it to work? Please and thank you! ! !
@eucarya: I’m not sure what you’re having difficulty understanding. Just read the last few paragraphs: “So at a command prompt I was able to delete the file using…”
@vassos: try using ‘ren’ before del.
1. in dos, navigate to the directory of the offending folder
2. dir /x/a to get the 8 character name of the offending folder
3. ren [your 8 bit filename] to something like “temp”
4. del temp > yes
thats worked fine for me..
Wolverine
Got it to work, had to use the “rd” commands as the folders were the ones inherited from my Mac with periods…
The problem I was having was that I was forgetting to add the quotation marks to the file path I was trying to remove. So if you can’t get it to work make sure you add quotes around the file path (i.e. del “filepath” or rd “filepath”)
Thanks!!
After several tries I finally got it to work! Thanks :D
Thank you sooo much. I could NOT figure out how to delete one of those DOT files. Now I know!!!! Bless you my child. LOL
you win
Great ! Thanks !
My problem, as others has already said, was not due to a “shittyfile.” but a “shittyfile.xls ” …. A space at the end of the .xls extension drove me crazy for two days.
Thank you again for your smart post !
Now,
How can i create a folder that end with period?
How Can i rename a folder that contain a period at the end, what is the syntax in command prompt?
Thanks
im still having trouble with this. someone please help! i have only used the command prompt once prior to this, so i need step by step instructions. I opened the command prompt and it says:
C:\Documents and Settings\Kelly Gonrue>
The file I want to delete is “Coach case complete ”
Please help, I would really like to delete this file!
Thanks a lot, it worked a treat on a stubborn folder with a space at the end of its name. XD
Thanks! This worked great at first, but I’m still having the same issue with hidden resource fork files that are created by Macs, for example it shows up in Win as “._filename ”
Anybody have any luck with these files? I’ve tried using wildcards, /ahs, copy and paste, but can’t get it to delete them.
Thanks again for this helpful post!
..OMG! that was really helpful!
now my mind is at ease..
thanks a lot..
yer a genius..for me. ^^,
A+.
Worked like a charm. Thanks for making this public! :)
Hey Martin! Well done the Wildcard at the end was the only way to take it off the Desktop!
Good teamwork all!
Thanks a lot for this information !!
Was of great help to me !!
Thank you so much, I was going ballistics over this file, and nothing worked but this! Cheers!!
Tried this command and it worked on all but 1 file. THe file in question has 2 .. at the end no spaces. I can see it in windows explorer and in the properties it has no hidden attribute but if I do a dir in dos it is unable to see the file. So therefore it won’t delete it doing the above command? Any thoughts?
I had the same problem, but with spaces in start and the end of the file name. It removed with Kieth’s solution.
Dude:
I have been unable to delete a file for months. I work in an IT department and even go to school for IT;however, no-one could tell me how to remove the file. You, my friend are awesome; your method worked perfectly. Thank you very much for your assistance.
Tacojew22
please help.i need to delete this “C:/Documents and Settings/Korisnik/Desktop/Gipsy Kings Hotel California “.how could i delete it.it has no dot but space at the end.thank you
cmd
del “\\?\C:\Documents and Settings\Viktor\Desktop\ The Madagascar panguins ”
The best solution! (i was googling for it 2 hours)
Cheers Duncan, I’ve had a file on my desktop for months and tried everything I got by googling but nothing worked – until now :-)
You are a genius! I spent hours trying to delete a crappy file with no success, until I found this method. Thank you so much!
You rock, thanks for the help with this. All the other forums led me astray :-)
ive tried it and it worked but the folder is still stuck in the recycle bin and it cannot be emptied
please help
An extra tip: if the file is hidden use this command:
del /ah “\\?\D:\uit_dienst\pootsm1\Homedir\1\CAH4QDX3″
Greets
I’m still unable to get rid of my pesky file. It’s called “FW_Ya know you’re a Floridian if..” and it’s on my desktop.
So, I tried del \\?\C:Documents and Settings\Desktop\FW_Ya know you’re a Floridian if.. and it’s saying the file couldn’t be identified. Am I doing something wrong?
Thanks a lot!
I downloaded a file off one of the many sendspace/rapidshare/mediafire clones and the file ended up corrupt. It has been bugging me for a while now and this really worked.
To those who have trouble doing it, you have to make sure that the file is in quotes, that there are no typos at all, and if there is no dot at the end of the file then it probably ends in a space.
thx bro… (damn Mac User..). :D at last.. i can get rid of those files..
Hi! Ijust noticed this site – two days back – Please help me. I
The name of the file is: Instant File Search 1.7.5.
I did the following;’
Start > Run > CMD> and on command prompt I typed:
del”\\?\c:\documents and settings\fulchand shah\local settings\application data\microsoft\ cd burning\instant file search 1.7.5.” I can not delete it. Kindle show me steps I should follow
I love you!
thanks sooo much!
I actually tried this and it didn’t work. Then I realized why – it was a folder and I needed to do the same thing with the rmdir command. Thanks for the help.
I wonder if you could rename a file rather than create one ending with a period. Any help? (*srry im evil)
I Had the same problem of “Johnny on October 6, 2008
Hi… I’m trying to delete the following filename “The Gate dvdrip(ironeddie)Divx[1].avi.”
Here’s what I’ve done in Command Prompt so far.
Directory of C:\Documents and Settings\Desktop\Maps
10/06/2008 04:37 PM .
10/06/2008 04:37 PM ..THEGAT~1 The Gate dvdrip(ironeddie)Divx[1].avi.
09/22/2007 02:13 PM 0
10/05/2008 04:23 PM 21,661,580 Thumbs.db
2 File(s) 21,661,580 bytes
2 Dir(s) 17,562,890,240 bytes free
I tried every reccomended method of deleting the file as described here to no avail. I Know I’m getting the file name right because I’m using the tab key.
Guess my question is what exactly should I type in from C:\ (at the very beginning) to delete this file with the dot at the end? When I try to preface a path with \\?\ it says the following.
CMD does not support UNC paths as current directories.
=(
Exactly what’s been tried thus far…
C:\>del \\?\C:\Documents and Settings\Desktop\Maps\The Gate d
vdrip(ironeddie)Divx[1].avi.
The system cannot find the file specified.
C:\>del \\?\C:\Documents and Settings\Desktop\Maps\”The Gate
dvdrip(ironeddie)Divx[1].avi.”
The system cannot find the file specified.
C:\>del “\\?\C:\Documents and Settings\Desktop\Maps\The Gate d
vdrip(ironeddie)Divx[1].avi.”
The system cannot find the file specified.
”
I resolved it with
del “\\?\C:\myFolder\myfilebad.AVI.” /a
Sorry for my english, i’m peruvian
THANKS A LOT DUNCAN
Thanks Chola! I could not figure out why
del “\\?\C:\Documents and Settings\jsmith\Desktop\CAFUM93N.” was not working. I went through half this list trying every suggestion, then I hit your solution. The /a at the end finally did the trick. YAY!
Thank you Chola. The /a at the end worked.
Thanks a LOT to Duncan. I have saved this page in my favorites now.
The /a at the end is what finally worked for the hidden file. After 2 1/2 hours of working on this and constantly getting the message: “The system cannnot find the file specified”… this worked! THANK YOU!!!!!
There is a program that will remove files ending with a “Dot” it is called “unlocker Assistant” this is a freeware program that did delete the Mac files with ease. The link for this file is: http://dailyfreeware.net/2006/09/15/unlocker-183/
Go to the file right click with the mouse and select unlocker it will ask what do you want to do with this file, then pick delete.
I have a similar problem with deleting invalid files. But my problem isnt solved by the above method. (I can successfully create a *. file by \\?\ and it can be deleted by \\?\ after. But it just doesnt work for my other invalid files.)
So for people like me, that cannot delete files by the above method, this is what I used to solve it:
http://www.soft411.com/company/Assistance-and-Resources-for-Computing-Inc/DelinvFile.htm
Easy to use.
Oh my GOD I can’t believe it. I’ve been searching Microsoft’s tech sites, Norton’s sites (my files were NPROTECT files), running CHKDSK over and over, making the files unhidden and trying to delete them from the command prompt and DOS and XP, nothing worked. You have just released 12.7 GB of my disk. I love you.
Thank you very much! x 1000 times
I managed to use the command you recommended
copy \\?\D:\Disk1
to copy a file in an old CD I used a few years ago when my OS is Win95.
Under my present OS the file shows in the directory with 0 byte.
After the copy, finally it shows some data.
Thank you again! :)
Ong KL from Singapore
THANK YOU! THANK YOU! THANK YOU! THANK YOU!
This worked wonderfully.
If you want the simplest way to delete this type of file, download Unlocker- http://ccollomb.free.fr/unlocker/index.htm
Worked within a matter of seconds and deleted 3 files off my desktop. Fantastic!
End the year on a positive note .. technique works on xp v5.1 sp3 build 2600 (Pro) thanks a zillion. unlocker (noted above)took out the stubborn ones with AS attributes .. these files where found in the nprotect folder.
Mac files??? Grrrrrr .. never touch the stuff. Now, if i can just get symantec to stop puking liveupdate files into the nprotect folder every six minutes.
Awesome solution .. KUDOS
Awesome, thanks! Mine doesn’t even end in the dot, but it worked. Finally got rid of(C75_東方) (同人音楽) [dBu music] 廃弾奏結界 鬼譚奏鳴曲 Demon tale sonata (Lame3.96
if its on your desktop for example
do this…
in cmd type cd desktop (press enter)
type dir (press enter)
you should see the file there
for example if its called imatwatofafile
get the 1st 5 letters in this case it would be imatw
type
del imatw*.* (press enter)
now should be gone :)
did the trick!
thanks
Hi All, I have a torrent file ending with space. I tried all methods it does not go. When I do a dir the cmd prompt it does not list the file.
thank you!
this worked perfectly! thank you!! (the other suggestions on this blog and correspondence weren’t working for me)
You just earned 1,000,000,000+ internets from me. I had a stupid torrent file on my desktop forever that I was having this problem with, this did the trick for it :D
Many Thanks for posting, this worked for me for a file that had a space at the end of the file name. A brilliant solution that doesn’t require installing a freeware app.
del “\\?\C:\Documents and Settings\My Name\Desktop\filename.torrent “
I had that problem, and this works! The file in question ended in a space, with no extension. It was created by DownloadThemAll during a cancelled download. So I guess the OS allowed its creation, but couldn’t delete it.
I changed it to adsf.txt, and deleted it, no problems.
Great! It helped me to delete A blablabla.torrent file. Windows was giving me the same error. Since I had the file in the c:\temp directory I just went to the command prompt and did a del *.*
Problem solved.!
Thanks.
THANKS SO MUCH BRO!!!
This works for deleting files very well, but I cannot get this same method to work while trying to remove directories.
Actually, I was looking for a way to create folders that cannot be deleted normally by Windows and you helped me out!
Just passed md “\\?\c:\AnnoyingFolder.” to the command prompt and there! it works like magic.
One other thing…
Whenever you create a folder ending with a dot, you can neither access nor delete it.
Should you however create a folder whose name ends with a space (” “), you can access it like a regular folder but you cannot delete it. In such folders, any subfolder or file you create is *lost* for good. Windows does not recognise its existence.
Plus, as soon as you create any file or folder in a folder whose name ends with a space, the DOS command, RD, or RMDIR does not work on it nor its contents any more. You’ll have to use the program Unlocker.
My warning: Do not mess around with folders whose names end with a space or you will be in serious trouble.
Thanks man. You’ve been of help.
Thank you Thank you Thank you!!! The unlocker program worked perfect. Thanx once again to all of you and your input
Thank you so much for sharing this solution, Duncan. A worthy contribution to the public good.
I have a Firefox bookmark folder named “Car..”, which when imported into IE8 becomes “Car.”! Stupid Microsoft! The imported bookmark folder is neither accessible or deleteable from within IE or Windows Explorer. Thankfully, your solution works for me!
OMG THANK YOU SOOOOOOOO MUCH!!!!!
absolutely fantastic. i tried everything to no avail until i found this solution. Thank you very, very much!!!
Thank you Duncan… Two week problem fixed.
unlocker 1.8.7! i’ve been trying to delete a file for two weeks but now it’s gone. thank you unlocker =)
Thank you Duncan,
The same problem happened to me yesterday. I used, Chkdsk, Moveonboot and unlocker but they did not help me.
I never thought that this was that easy. Now I tried and it worked.
Thanks million times. It is really annoying to have it on your desktop.
THANK YOU! The unlocker worked flawlessly and got rid of a folder that ended with a space. It was driving me crazy for over a month!
TYVM (grrrr Mac people!)
I used rd /s \\?\path and it worked perfectly.
This page was #1 on my Google search of the error!
Gotta love the Series of Tubes!!!
Not working for me: On my Win Server 2000 When I try:D :\data\Scanner\scan>del “ADVISORY SERVICES” I get
Could Not Find D:\data\Scanner\scan\ADVISORY SERVICES
Tried the unlocker it gets message of Process not locked, “Object cannot be deleted”
Grrr…
These folders are created when someone scans a doc, saving it to the network. It seems that occasionally certain files just wont delete. Any suggestions? tks
SOLVED: UNREMOVABLE DIRECTORY!
Ok, so I have a Windows XP machine with a shared folder used by some Mac users. That got me in trouble. Now I have a load of folders I can’t delete, even using the above suggestions. COBIAN BACKUP to the rescue! I use the Cobian Backup utility (free) for other folders and I noticed it successfully removed folders I couldn’t – AND – on the Cobian “Tools” menu, there’s a utility called “Deleter”. You can browse to any folder name on the XP PC, select it, check the box that says “Delete recursively” and away it goes. Those guys RULE! Yeah, maybe installing a backup utility is a little more than you want to do, but it only takes a few minutes and it was soooooo worth the time. FYI, I’m running v.9 of Cobian Backup. Good luck to you all but this worked great for deleting a bunch of Mac-deposited folders!!!
the command line resolution suggested here did not work for me, but the “unlocker” utility did provide a quick and easy install and fix.
thanks!
Thanks BryTech! Your solution (after trying many) was the only way I could get these folders to delete!
No problem. I couldn’t get the folders removed any other way. Even Unlocker wouldn’t do it for me.
Awesome solution, thanks!!
Perfect Solution. Thank You.
Thank you so much.
try double-click on the file and open it with Notepad. Then, you will see a message: ” Do you want to create a new file? ” click YES. Then, write something in it few words and click on SAVE. Close Notepad and go to the file again , right click on it and delete. Worked for me. Hope it will work for you…
Actually, it did not work for me at the end so don’t try it. But i downloaded the UNLOCKER and it deleted the files finally.
Thanks a lot….was finally able to get rid of a troublesome file that’s been makin’ me nuts for the longest=)
worked great for me with a file name that ended with a dot. command prompt lists it’s directory like so
c:\documents and settings\eric>
you must remember to use the command cd\ first
eg. c:\documents and settings\eric>cd\
press enter and it will now show
C:\
now type the file you want to delete and it will look like this:
C:\ del \\?\c:\documents and settings\eric\desktop\annoyingfile.
example spacing correction
Only required space is between del and the \\?\ any other spaces are the actual spaces in the directory and file names.
C:\>del \\?\c:\documents and settings\eric\desktop\annoyingfile.
at command line it kept saying it couldn’t find the file, but when I typed (from inside the folder) del awaken~1 it worked great. Use the DOS filename.
Thanks a lot !!!
I had two such cases on my machine. One folder and one file. Both were deleted with no problems.
Thanks again, and keep the good work going !
You are the best! Thanks!
Thank you for the command line code! It’s been bothering me for a few weeks and it’s been a VERY long time since I’ve had to use a DOS command line!
Thanks so much, the little twerps have been annoying me for so long.
Thanks for the elegant solution and to those intrepid commenter’s who where able to fill in the chinks! The last time I had a file like this I reformatted to remove it, this is a darn sight easier!
Thanks for this kool stuff buddy
YAAAAAAAAAAAAHOOOOOOOOOOOOOO!!!!!!!!!
THANK YOU SOOOO MUUUUUUUCH!!
YOU ARE A GENIOUS!!!!!!!!
YEEESS!!!!!!!!
This works wonderfully.
For those havin’ trouble typing in the path, click and drag the file name into cmd eg: del “\\?\click and drag the name of your file here and the path will be filled in for you. Use your back arrow on your keyboard and delete the double quotation mark ” that appears before the C: or D: press Enter and yer done.
Click and drag the name of the folder into cmd if using rd /s “\\?\ remember to delete the quotation mark, press enter, type y for yes then Enter and voila.
Thanks, I waded thru a lot of info and tried several things before I found your solution
THANK YOU SO MUCH!!! At last, after several months, I could delete an annoying file thanks to your precious advice. I am really happy and very greatful.
Ciao from Rome
Thanks a lot, man!!! The del command didn’t work as I’m on WIN XP SP 3 NTFS, but unlocker still helped!!! Many thanks !!! Also for the trick;-)
Thanks for all your input. The Unlocker Assistant, http://ccollomb.free.fr/unlocker worked! I was able to delete two files that I have been trying to delete.
Hi there, I had a problem deleting a folder created by a program — I tried the above but this did not work for me (I have ended up with the folder on a number of drives through syncing) the only way I seem to have been able to get rid of the folder is by booting into Ubuntu by CD and using Linux to get rid of it!
Hey thanks for the solution! Been looking all over the web for help and you’re the best!
I just tripped over a super simple (that’s me!) solution. Open the fikle with Unlocker 1.8.7, change the pulldown to delete, and bingo….gone.
Thanks. In my case there was very very very very long file name.
100% working.
Thank you so much.. :)
Bingo! (problem solved)
Much appreciated. Smart stuff! Thank you.
Duncan. Well played! Solved an issue with a craptasmo file that threatened my very existence. It has been dealt with and life will resume. Tragedy avoided. I like many others feel the wrath of The MAN often and appreciate simple solutions. Now time to catch the 405.
Duncan, These three files have been on my desktop for years. I was spring cleaning this evening and was bugged one more time by the files mere existence. I stumbled on you solution and it’s genius. I too was told by my IT department there was no way to remove the files and evene if they rebuilt my hard drive there was no GRT they would go away. Hats off to you a million times. I am grateful.
Duncan, thanks! I’ve had two files stuck in a folder for months that I hadn’t been able to get rid of.
I am not able to type the recommended command in the “command prompt” as it shows :
C:\Documents and Settings\username>
I’ve tried 2 use all “delete” programs..but,they didn’t work.
The file is on desktop.
The annoying filename is :
out_BuBut you love me,Daddy !
Help needed..DESPERATELY as I luv a clean Desktop.
If u want..u can mail me.
But,plzzzzzzzzz ASSIST me.
Ty for the info…
At last i deleted that pesky file
THANK YOU SOOO MUCH!!!!!!!!!
I am not able to type the recommended command in the “command prompt” as it shows :
C:\Documents and Settings\username>
I’ve tried 2 use all “delete” programs..but,they didn’t work.
The file is on desktop.
The annoying filename is :
out_BuBut you love me,Daddy !
Help needed..DESPERATELY as I luv a clean Desktop.
If u want..u can mail me.
But,plzzzzzzzzz ASSIST me.
My file was on my local disk, not a system file and not hidden. It did appear to have a trailing space in the name. None of the above worked directly, but a variation/combination of posts led me to try this, which worked:
1. cd to the directory with the bad file
2. dir /x /a to get the file’s short 8-bit name, say “shortname”
3. del /a shortname
No other options on the del command. For example, “del /ahs shortname” did NOT work since the file was not a system or hidden file. I don’t know what the “/a” option is supposed to do without additional specifiers, but it worked for this case.
@Anurag, in step 1, to cd to your desktop, just type “cd Desktop” from your “C:\Documents and Settings\username>” prompt.
Hi Mac, thank you. This works. Each file is different. Lobe this page.
Thank you!!
Thanks,Mac for showin’ concern for my woes..
Though,due to ineptness of me..it didn’t work.
But,something DID work..like a magic..after goin’ thru d agony of watchin’ that irritating file’s existence on my desktop:
http://ccollomb.free.fr/unlocker/
Amazing..
ooooooooohhhhh my goddddd..
its working…….
thanks man..
may god bless you.
Well done man….. I had this “ghost” and looking for solution a month now….. thanks
thx a lot….
>,< this solution is great
But,something DID work..like a magic..after goin’ thru d agony of watchin’ that irritating file’s existence on my desktop:
http://ccollomb.free.fr/unlocker/
Amazing..
YOU ARE GOD!
My God, I was having such a terrible time; look am a maniac, ok, I couldn’t live with this damn file that refused to go away, and you had the seemingly non-existing answer. Thank you!
Thanks a lot! Worked for me.
worked for me!!
gee, thanks a lot! :)
Thanks Chola, that worked.
Again, another big thank you
Thank you very much man
Thank you so much – my server just been hacked with 10gb of s**t – this save my life, many thanks man.
I was pulling my hair out having tried just about all the standard stuff to remove an annoying directory. This worked like a charm. Thanks!!
Duncan you just rock man! I spent the last 30 mins of my life searching for this issue in google and I’ve found only really stupid suggestions and explanations of this little problem. Until I got to you! Thank you so much :)
Worked like a charm – thanks!
Big thanks
You are a legend, thanks alot for taking the time and effort to post this.
thank you. incredible !
you da man!!! and the others that helped you come up with this!!! at work they always call on me to fix computer things and now after searching and finding this for my personal computer, i think i’m gonna have some fun at work with creating files and then deleting them! hehe ;)
Thank you!
I suffered for one year with one file/notfile on my Destop (no possibility for change name, delete or move through normal way)
didnt work so depressed
Impressive..!
Finally I got rid of those stupid files on my desktop..
Thanks VERY much Duncan..
wow…
thanks a lot duncan..ftr a month, finally i found it. thnks!
Fan-bloomin’-tastic!!
Thanks a million, worked a dream…
Thanks alot for taking the time and effort to post this, tearing my hair out trying to get those damn directories to delete.
this just saved my life. thaks
Thanks!!! worked great
Great! It works also for files with some weird invisible characters (these files came from my Mac at work).
Thanks for that, I had some files with the syntax [file name] at the start of the filename that apparently, windows didn’t recognize. However your solution beautfully deletes them (and creates them too !!) One thing I would add, is that instead of using two “” at the end of each command line, just leave the command as it is untouched after you paste the offending file name. this worked well for me with a multitude of different names.
Thanks a MILLION. ‘Unlocker Assistant’ worked. File deleted successfully
Thank you.
Just had a similar issue with a folder containing a space as last character (“FolderName “). Your tip helped also in this case. Thanks
Hi,
I’m probably the most unfortunate of you all – I’ve got a folder whose name ends with a backslash. I’ve no idea how it got created – I probably copied it off a pendrive, although I can’t imagine which OS would allow this.
05/17/2009 03:39 PM .
05/17/2009 03:39 PM ..
08/18/2007 04:32 PM defective\
0 File(s) 0 bytes
3 Dir(s) 11,153,424,384 bytes free
Thats the folder – please not hat it was called defective because I had kept some incomplete videos in it – NOT because this was intended.
I’ve tried Unlocker, Delinvfile and all the methods in the comments above – absolutely nothing seems to be able to find the file. And Delinv fileshows its short name also as “defective\”. I’ve no idea how that can possibly be because that is 10 Characters. For some reason /x/a does not seem to show short file names when I use the switches with the dir command in cmd. Any Assistance will greatly appreciated.
Just had a file that ended with a space this worked on the First Try….Thanks
Found the solution to the file copy problem. It was a firewall setting of AES-128 encryption that was mucking up the copy. Changed it to a lower encryption.
Thank you! The file that got stuck on my desktop was actually a partially downloaded pdf file, and it didn’t have any extension at all… Tried three different things in the command prompt, and it worked when I added a space to the end of the file name!
Thanks! I can get around a puter, but not such a hot shot but this worked easy, way to go bro’!
Thanks! Got rid of a torrent file I couldn’t delete.
hi! i hv a whole folder to delete . i tried using ur suggestion but itsnot happening …. :(
the file names r strange like “*”, “”
C:\MetaStock Data\april\
pls help
UNBELIEVABLE!!!
IT WORKS, LIKE A CHARM (TO QUOTE SOME OTHER USERS).
THANK YOU SO MUCH FOR YOUR TIP, DUNCAN!
Hope this can help: I had 4 files ending with a space. They were flagged system and hidden.
I couldn’t delete the entire directory because it was my desktop folder!
The \\?\ trick doesn’t work, because of the H and S flags.
The /a trick works instead! It works because you don’t need to specify any path (and the ANY filename, right or wrong it is, with ending point o ending spaces: it doesn’t matters). The wildcards and the /a will do the rest.
del *.* /a (only if it is a simple file)
del *.* /ash (in my case)
So happy… it worked for me. Thanks a lot for sharing it.
use a third party software called “unlocker” to delete the file permanently, here is the link:
http://ccollomb.free.fr/unlocker/
that unbelievably worked for me after trying all other useless ways.
hope it does the same for you
You smart boy Duncan…
Thanks very much. First I typed in command prompt del “c:Documents and Settings\cinkhede\Desktop\Annoying file you can’t delet
e.”
By using TAB key & then added \\?\ before filename.
Worked fine for me.
Worked beautifully. This is a problem I have been trying to solve on my windows servers for months. Thanks a bunch!
The file I am trying to delete from my desktop is “CASJQTMT.” Duncan’s solution didn’t work for me. Unlocker did not work either. Any suggestions?
Nevigate to desktop through command prompt & try the following:
C:\Documents and Settings\Username\Desktop>del “\\?\c:\Documents and Settings\Username\D
esktop\CASJQTMT.”
wow kickass, this worked!
Thank you. this works perfectly.
Thanks Dude. U r great
Thank you very much Duncan! I also inherited a bunch of these files & directories and they were a major eye sore. What a great solution. YOU ROCK!!!
Thanks for the heads-up. I had a few of these files that came from…….a MAC. But, not anymore. Thanks again!
Hi guys! Normally, I am one from those that only read about such problems without contributing. However, this time, I want to share my experience on how to remove these files and deal with this “cannot delete file cannot read from the source file or disk”
So, after reading all this conversation, I downloaded the Unlocker (http://ccollomb.free.fr/unlocker/), although full of doubt!
Simply, I installed it, I right clicked on the files and I deleted them right away!
So, the most simple way is this Unlocker, if one wants to get rid of these files, stuck on our desktops! (btw, they were .torrent files)
Dude I love you, this file randomly showed up from a torrent and I was worried it was a virus or malware sorta file that wouldn’t delete it self. Glad to see it was not, thanks for the help.
Worked like a charm, thanks!
PRECIATE THAT HELP WITH USING THE UNLOCKER PROGRAM, WORKS LIKE A FUKIN CHARM YA DIG!!
Excellent, it worked! I was getting so pissed off with these Mac folders on my WinXP machine! Thanks!!
RMDIR! THANKyou thankyouthankyou!
Oh great! been hunting for this! thanks works flawlessly on XP64!
THANKS A TON.
I broke my head for several days on this.
Thanks for this, worked like a charm for me too. It was also a “buddy file” for a word doc that I received from a correspondant on a mac.
Thanks such folder where stuck one of our servers, this really fixed the problem. Since the volume was on a raid 5 i doubted it was a bad sector.
Thanks again !
i have tried every thing but nothing seems to work. it doesnt seem to recongise the file at all. the size is zero.
i keep getting msgs like this when in dos:
1. the file name, directory name or volume label syntax is incorrect
2. couldnt find ….etc
My folder I want to delete doesn’t have 8-bit name. Other folders do, but this one has just empty space.
Unlocker doesn’t help either.
(Yes, I run SP3)
Thank you so much for the help! I’ve been struggling with a folder for a while. No longer.
Solved it! Opened Nero BackItUp ImageTool and deleted it from there ^^
just a note You have done an excellent job sorting this problem another way is go to start hit run type in chkdsk /f and checkdisk acts as the old scandisk instead of windows new checkdisk nb TO ALL THEIR IS A SPACE BETWEEN CHKDSK AND STROKE F ie.,CHKDSK[SPACE]/f
alot easier and works i run it regular saves defrags
Thank you very much for this fix! I was having problems with a folder in Program files.
It was called “Mafia” but there was another folder also called “Mafia”. I looked closely once and it turned out to be “Mafia ” (with a space at the end). That seems to cause problems with windows, as I can delete one of those files, but if I try to delete the other (or access it) it says the location on the disk can not be found.
But your ‘rd /s “\\?\C:\” fixed it
Thank you again
I downloaded a torrent file the other day….Firefox saved the torrent on the desktop. Long story short, I could not delete the torrent files from the desktop. I would get an error message that read, “Cannot read from source disk”.
Frustrated,with re-install disks in hand, i decided to research the problem and I stumbled across this post.
THANK YOU SO MUCH!!!
I went and got the “unlocker” program. NO MORE FILES!! very good software, easy to use, and a handy tool to have if you do a lot of downloading. THANK YOU!!
Dear Duncan,
I just want to say thanks a million for helping me to solve the problem of a “0 bytes” file that wouldn´t delete. I have been trying for 3 days to find a solution on the internet. I´m dizzy with all the sites that I´ve visited and reading all the similar problems and solutions (that didn´t work in my case). I had accidently created the problem by naming the folder “ONCE UPON A TIME..” (notice the 2 dots at the end of the title). It seemed a good idea at the time, you know, instead of writing the whole title….boy was I wrong. I´m not so computer savvy so I went looking on the net for a solution. I tried FileAssassin, File&Folder Unlocker, MoveonBoot etc, etc, etc. I was getting obsessive about it (I don´t like to give up!!!). Most of the suggested solutions worked if your computer recognises the existance of the cursed folder, but in my case it said the location (folder) didn´t exist, or that it had “no handle”. I tried ChckDisc but it came up clean and the folder wouldn´t budge. I tried Safe Mode, i tried overwriting with another folder (unamed and with the same name)…no joy. It wouldn´t let me move it or change it´´s name. In properties it confirmed “0 bytes”, and I also confirmed it wasn´t being used by any other program. I scanned with anti-virus, Spybot Search & Destroy, and Threat Fire, just to make absolutely sure I hadn´t somehow picked up a rootkit or virus/spyware. All clean. Some of the suggested actions I found on the internet filled my trembling heart with more fear of disaster than is healthy and I didn´t dare try them (“Avenger” for example). Some of them seemed too damned complicated to follow.
Then, just 20 minutes ago, I found your explanation, clearly and simply written…and better than your explanation, your solution, also clearly written. I followed your instructions carefully and…..(drum roll)…it´s gone!!!!! So unless it comes back on my next reboot, I´m so happy I could have your children!! (not literally). Just want you to know that I´m really , really grateful and thank you once again.
Best Wishes.
Thank you very much!
Excellent guide.
I had a few annoying files accumulaling.When you can’t get a file to behave the way you want it to do it canbriefly take over your life.LOL.
thanks for the great work
Thank you much!! That worked for a file i had which had a blank space at the end!
open command prompt.then select the in which the file you want to delete is placed.use dir command.use the tab key to select the file u want to delete.then add a word del in front of the file name n press enter.give yes.your file will be deleted
open command prompt.then select drive the in which the file you want to delete is placed.use dir command.use the tab key to select the file u want to delete.then add a word del in front of the file name n press enter.give yes.your file will be deleted
open command prompt.then select the drive in which the file you want to delete is placed.use dir command.use the tab key to select the file u want to delete.then add a word del in front of the file name n press enter.give yes.your file will be deleted
thx for the post – google helped me find you and I had a folder with a space on the end of the filename and the command prompt thing helped.
PAY ATTENTION TO BACKSLASHES AND QUOTE MARKS. THESE ARE VITAL TO MAKING THIS WORK. BUT IT DOES WORK. I HAD TO TRY FIVE OR TEN TIMES TO GET ALL OF THE BACKSLASHES AND QUOTE MARKS IN THE PROPER PLACE. BUT THEN AGAIN, I AM SLOW. THANKS FOR THE SOLUTION. THIS WAS DRIVING ME CRAZY!
thanks a lot man…
Im getting the same error message, but my file doesnt end in a “.” I’m copying a file called “trance around the world.mp3″ and pasting it into my phones memory.
I know it definatly has enough space, but for some reason it’s refusing to do it :(
Unlocker! FTW!
My only additional suggestion is that you go to Properties to make sure you have the exact file name. The file name I was trying to delete was “Fwd_ FW_ Transplant…..” On the first ten tries, I did not realize there were *spaces* in the file name! If you right click on the file and select “Properties”, you can copy and paste the exact file name from the top box into Word, write your command there, and then copy and paste it into DOS. Worked like a charm once I had the correct file name!
HOLY SMOKIN CRAPPITY CRAP CRAP…lol thank you sooo much..i recently re-installed my o\s just to be rid of a pesky file that didnt finish downloading and remained as an undeletable file in my dl folder…finally figured it out with lots of help from here and a couple links posted here…i can now officially help others with step by step instructions to completely remove those files…one way or another i will help anyone who asks for it , long as i get the emails from this site…thanks to all and ill continue the chain of helping!!!
And no..i wont get u to reinstall windows to fix ur issue when i help haha…i had to delete a second one recently on my new system and got rid of it through the command prompt…i tried everything and finally got it to be gone so dont fear…HELP IS HERE!!
I tried the syntax above for the removal of folder to which I receive a response “Are you sure ? and reply Y, only to have a succession of errors that the system cannot find the file specified.
This followed by “The filename, directory name, or volume label is incorrect”
Is it Operator error?
I assume since I receive the positive response, that the syntax is correct.
These are all peculiar symbols for file names, that I can’t replicate. Unlocker has not worked. I’ll try MoveON next.
i had a music file that canceled during download, its left a part file on my desktop and wouldnt move, i used the command prompt function and it worked perfect, thanks (Y)
Thanks a lot. At last i could delete this irritating file on my desktop and it saved me from reformatting my system over again. Nice suggestion
thanks a lot.. totally awesome.. i had an ugly file for years and the only option seemed like formatting the disk..
thanks a for a making my day…
Thanks a ton for posting this article. I am indebted to you. I lost sleep for 1 day due to this “cannot read from the source file or disk” error. The suprising thing is, this dot named folder was created by Microsoft webcast website when I tried to download its presentation in live meeting format. You are smarter than the MS guys :)
I had a Safari shortcut that had that “cannot read …”. I was trying to delete it via the method at the top of the screen but it wasn’t appearing in the cmd window. To solve this I changed the attributes of the file to “Hidden” then hit F5 to refresh the page and all of a sudden I could delete it. Weird, I’m blaming apple!
hey when i try to paste the bad file name in command prompt it gets paste and ia am getting continous beep from my cpu and when i press enter it returns to the normal prompt but the file wont deletes again
I have had success finally, with Error-checking on disk properties. (Select Drive, right click> Properties> Tools>, select both Check disk options > Start. My bogus files were on external drive, and this worked simply and beautifully, since I had been unable to reproduce file / folder names (hieroglyphics) from CMD line. Folders and files are gone, and able to delete folder from drive. yippee
thank u finally i deleted them using del *.*\a command i lost other files with them but atleast i got rid of those files thank u
[...] is an easier way to do this. At the Command Prompt, type a \? before the file or folder path. This will allow you [...]
Thank you very much.
Finally simple and elegant way to clean the annoying files.
Thanks! I had a folder with a space at the end…
THANKS. I had a folder with space at the end in my steam folder and it drove me nuts.
THANKS. Finally, I can delete that annoying file on my office pc desktop….
Err! in my case
D:\websites\Hub>rd imagegallery
Access is denied.
D:\websites\Hub>rd /s “\\?\d:\websites\hub\imagegallery”
\\?\d:\websites\hub\imagegallery, Are you sure (Y/N)? y
Access is denied.
Its happening on a Windows Server 2003 Standard Edition. Can you please help me with this.
thanks guys this method really worked and is very effective
I did it in command prompt to take out a self made folder from
program files
Thank you very much…
My problem finally solved by using “Unlocker” program,
since the Japanese character cannot paste completely into command prompt, the problem of “The system cannot find the file specified.” continue exist..
In my external hard drive “G” I found a lot of files with symbols and future dates reading 12/16/2036. All the files are empty and look like the following: 9hÜ{ë.m╝
I cannot delete them keep getting error code: Cannot delete file: cannot read from the source file or disk.
There are a couple of hundred of these files in my external hard drive. How can I remove them? I tried the “Unlocker” program but it says their not locked and when I delete them they’re still there. I would apppreciate if you can help me.
Thanks a lot!
It really workes!
Finally I succeeded to delete these annoying files.
Wow, how silly of windows. Thank you so much for helping me fix this!.
When I put my code into the command prompt (Start > Run)”
del “\\?\C:\Documents and Settings\Administrator\Desktop\CA6FKTS5.”
Then click Ok, a browser spawns and tries to open http://del/ which of course can’t be found. I just can’t seem to execute a dos command from the command prompt…
Am I being a dumbass, or there something else?
Ok, I’m a schmo, but, I still put it into the actual command prompt window (Start -> Run -> CMD (enter)) — I paste it in there:
del “\\?\C:\Documents and Settings\Administrator\Desktop\CA6FKTS5.”
And it says:
C:\Documents and Settings\Administrator>del “\\?\C:\Documents and Settings\Admin
istrator\Desktop\CA6FKTS5.”
Could Not Find \\?\C:\Documents and Settings\Administrator\Desktop\CA6FKTS5.
Any ideas?
Very neat trick :-) Thanks indeed for the information!
Thankkkkk you very much….
It worked wonders for me…the command worked and I was able to delete a file which was showing hell…thanks for your expert advice and I would give you a hug if you were beside me…Thanks again….
Manzoor
That worked great–and the instructions were clear enough that even a command line phobic person such as myself could do it. Thanks!
thanks a lot …..
:)
Thank you very much, worked like a charm!
You nailed the problem!!! My file ending in “.” was within several nested directories. The “\\?\” approach didn’t work… and I tried many combinations. HOWEVER, just using rmdir /s worked perfectly (just naming the top directory)! THANKS AGAIN!
Hey, so I looked over this post for quite a while and my file was not going away. So this is what I came up with:
Every time I would type in the del “\\?\E:… it would say that the file was unable to be located (even when I would copy and paste the extension directory, so I knew I had it right). I even would tab through the entire directory so as to be extremely accurate. Nothing seemed to work.
By the way, this file was on a flash/thumb drive and was formerly/caused by a corrupt .docx file (a.k.a. ms word 2007).
So I ended up using the “rd /s “\\?\” command and deleting the entire folder it was in. Well, it worked. Here is what it looked like when I typed it into command prompt:
rd /s “\\?\E:\—school—\—-Fall 2009—-\Marketing (sales) 3200\Homework
pressed enter, and…. good by folder! the corrupt file was reading 1.2gb on a 4gb flash drive. How STUPID! But now it is gone and am glad I ran into this post. Also glad to find there are others with similar problems and im not just an idiot.
Hope this helps
I’ve never left a comment on a blog before. I generally try to stay away from them because of the risky advice and, let’s just say, poor attitudes often encountered. However, I’ve been fighting a plethora of computer issues for over a week now. The latest was a corrupted Recycle Bin where I found I couldn’t delete 321Mb of Symantec files. I’m so grateful for stumbling across this link that I’m breaking my rule (“More of a guideline than a rule, actually.”) and saying, “Thank you.” I don’t know how many times I, too, have struggled with this issue.
Also, allow me to say that, although I didn’t read all the posts, I found the inputs, attitudes, and egos to be wonderfully different from those other blogs to which I referred.
Thanks, again.
Duncan, you are a god among men. Thank you for this post, it fixed a suuuuper annoying problem I had.
Thank you so much. I’ve had this annoying file on my desktop for MONTHS! Now it’s gone. Hurrah!
Thanks, it worked. It should be noted tough, that even in DOS prompt, I got the message “the system can’t find the specified folder… blah, blah, blah…”. When I looked again where it was, it had simply vanished. Let me tell you, every passing day I think more and more that computing is modern day magic.
Download this program: http://baixaki.ig.com.br/download/unlocker.htm
When finish install one new option in your windows right button of the mouse will be showed.
click whit right button of the mouse in the file that you need and select the action.
This program is perfect and very easy to use.
tanks
Rui from Brazil. sorry by the my worst English
thanks so much!
I also had a few files which I had downloaded and they had a space at the end of extension, so like they were 4-char extensions, and I could not get rid of them. removing them from the DOS prompt worked at the very first time!
I was lazy so I used the “del” command using the confirmation mode (/p) and confirmed “y” when it came to those files. Thanks again! I am happy tonight.
Hey thanks alot … This thing was bugging me for the last 3 days, atlast! Thanks alot..
What if I have over 600 .DS_Store files on a server, in many different folders that I want to delete. Is there an easy way or will I have to go to each folder individually to delete them?
@ETM the FOR command will help you do what you want. See http://ss64.com/nt/for_d.html
I had some folders that ended in spaces and question marks. The “rd” command line deleted them with no trouble!
And the tab-until-your-file name-appears trick sure was helpful when I couldn’t tell exactly what trailing character I was dealing with. Thanks!
THANK YOU SO MUCH!
THank you, you helped me so much.
This worked like a charm! Thank you SO much!
rd /s “\\?\C:\Documents and Settings\User\Desktop\Annoying Folder.”
Worked after I changed User to my user name.
Thanks been looking for a fix for over a year.
Just wanted to say Thanks I downloaded unlocker and it worked Thanks for the info..
All The best
Go to this site: http://ccollomb.free.fr/unlocker/
This will definitely help you
At last i got rid of this Useless file….Unlocker helped me it is the best!!!
Great thanks a lot!!
It helped me a lot.
Thank you!
This application, unlocker, really helped. Thanks a bunch!
Try a free program called “Unlocker.” It is not spyware or filled with any virus junk. Great for solving many issues when Windows will not let you control a file. Allows you to release Windows control with useful features and ease. http://ccollomb.free.fr/unlocker/
hi :)
very helpful, thank you for sharing your experience with netizens.
cheers :)
OMG!!! It worked!! Thank you!!!
It worked – thanks so much for relieving that headache!
Thank you kindly. This was a rather annoying issue for me.
worked perfect, glad i found this post quickly.
What a hero!
I couldn’t log off my pc nor log onto another because of this stupid file.
I really would have a beer with duncan. Total legend
Thank YOU!!!!!!!!!!
Thanks for the \\?\ switch… I have been trying to delete a folder for months and would always get the cannot read from the source file or disk BS. This worked great man.
Thanks loads!
It doesnot work it says The filename, directory name or volume lable syntax is incorrect
Thanks Dude!!!
You are a genius……..
I been trying it out for several weeks to delete 2 such folders on my laptop but all in vain.Then i searched it on google and was directed to this blog.
It was so simple that i was amazed…..
All my headache was gone so easy that i jumped out of my bed.
Previously i thought that it was a virus or something like that and kept on scanning with all kinds of virus removal tools and the trick was just so simple….
Hats off to you…..!!!
Thanks a bunch….that’s the solution i’m looking for. ,,V,^_^,V,,
Thank you so much! I appreciate it! this has been bugging me for a long time now.
Thanks it worked
Thanks a million!!! Had a file that was driving me crazy and now it’s gone!!! Respect!
Very interesting insight into NTFS and Win32 API. However the \\?\ did not work for me. The folders I couldn’t delete had orginated after copying the Favorites folders to my USB drive. I have had this problem many times and have usually resolved by copying all files off and reformatting the drive! The symptoms are: in Explorer or DOS attempts to delete a folder tree \Favorites\e result in the error at the beginning of this post. Folder properties show no security or sharing tabs on either folder. However I resolved it by using DIR /X /S which showed my folder structure was actually “\favor~2\e0256~1″. Using RD with these names allowed me to delete the files. Using \\?\… did not work in this case.
Many thanks Duncan for focussing me on what the real cause of my problem could be!
Thanks man. I had 2 files I could not delete bcuz they ended with ‘file…..” I had made a backup of my website and a form processor creates a file of the output with no extension that I can read in notepad from FTP. But once I backuped up my site on my computer, and then tried to backup my computer it would stop at these files and would not go any farther. Windows XP would not let me delete or rename the file. Your post worked perfectly to get rid of those files. Again thanks
Damn. People seem to get this problem but most people are ignoring it here. And I’ve tried all the ones that have actually tried but to no avail. I have tried everything but nothing works. The file is on my USB and I’ve tried the unlocker and all the \\?\,/s, commands but it still doesn’t work. I just get the same error, Could Not Find blah or when I try to delete the folder: The system cannot find the file specified or filename, directory name, syntax is incorrect. I’ve tried disk checking and I also typed in /a, not sure how that works though. The problem doesn’t seem to be the filenames. At least I’m not sure. One of the files is called IrSPXO~1.PRX and I’ve tried naming another file the exact same thing and I was able to delete it. So what’s the problem here?
Don’t know how to thank you man. I had couple of files on my Desktop ending with a dot and occupied my work space for months.
Thanks a bunch!
Oh snap! I’ve been living with a file on my desktop for months. Rather than have a . at the end of the file name, there was a space that I had never noticed.
Thanks for the direction and the relief.
[...] at the end of a file or a folder name. More information on this issue can be found on this blog here. Take the following steps to rename or delete the affected folder: Open your start menu and move [...]
I had this problem only I made the mistake if trying to rename so every time I tried to click off it was like OMG NO NAMING THIS FILE and since I had made no note of the name of the file first, I was stuck because every time I clicked off an error popped up. Fixed that by restarting explorer.exe.
I am having trouble with this fix: del “\\?\C:\Documents and Settings\Brenda\Desktop\Fwd_ Health tip of the day……” but I was unsure of how to open a cmd window and when I did finally open one it looked like this:
C:\Documents and Settings\Brenda> Is this correct? Do I just paste the fix in like this? C:\Documents and Settings\Brenda>del “\\?\C:\Documents and Settings\Brenda\Desktop\Fwd_ Health tip of the day……” I get the following error when I paste that into the cmd window.
The filename, directory name, or volume label syntax is incorrect.
When I go to this website: http://ccollomb.free.fr/unlocker/ it sets off all kinds of warnings on my computer so I was afraid to proceed. These are the errors that I have received: This website has been reported as unsafe. This website has been reported to Microsoft for containing threats to your computer that might reveal personal or financial information.
Can someone help?
Thanks! After downloading some louche file I ended up with 4 such undeletable files. They were just standing there, doing nothing, anoying me, and I couldn’t do a damn thing about it.
Thanks for your help.
Well I am a little slow with things but once I used the tab it finaly worked. Thank you, thank you, THANK YOU. I have XP and SP3.
Hi there. I’m a dummy at all of this but I have to get rid of some icons on my desktop that give me that error message when i try to delete or rename them. Where do I type in the “\\?\” ?
Like I type that before the filename right but how do I get to where I can do that?
Can someone please walk through it like they’re trying to show their grandma?
Deep thanks in advance.
Oh my stars. I’m terribly excited! Someone up there posted a link to a program called Unlocker and it’s deleting those icons just like that. I must go thank him/her!
I did manage to find out how to open the command prompt window from start>all programs>accessories but alas when i entered the command it told me the “The System Cannot Find the Path Specified”
But at least Grandma is learning a thing or two.
And those nasty icons are going just like that.
Now my husband won’t see a thing!
Wow!
thank you so much!
Finally! i got rid of that stupid annoying file!
THANKS AGAIN! Salamat.
~Ned
Thank you Duncan. \\?\ is the trick I was looking for.
Thats great Duncan… it is working for me using Win XP SP 3.. Thanks a lot.. LOL
Great post. deleted the dot file that was bothering me for a while now.
THANKS! Great tip.
had a similar problem. //?/ didn’t work, still same error, so I tried del C:\….\temp\*.* . Problem gone :-)
You rock! I was tasked to delete old home directories that data security could not and these old favorites were kicking my butt. Not anymore!!!
Thanks
One minor point missing for me was to ‘un-hide’ the file(s).
For me the steps had to be:
Attrib -H “\\?\D:\My Share\jobfolder xy\subfolder\*.*”
Del “\\?\D:\My Share\jobfolder xy\subfolder\*.*”
David Barnes
Barnes IT Solutions Ltd (BITSolve)
http://bitsolve.spaces.live.com/blog/cns!D0597DCC1B3A70EF!390.entry
OMG! THAT WORKED SPLENDIDLY!!! THANK YOU SO MUCH!!!!!
Duncan
Unbelievable
OH MY GOD
Thank you. Very much.
Thanks for your help.
Thanks, it worked.
Brilliant job. My OCD-like tendencies would not let me sleep until I found a way to delete these pesky files that I had just received via email and would not delete. At last I can go to bed. Thanks very much.
Did not work!
On explorer it says “Cannot read from the source file or disk”
On cmd, well are some weard characters so I made pic:
http://img29.imageshack.us/img29/3827/cmdm.png
Someone pluggen my usb stick off when I was copying files >:(
Help? Anyone?
Thanks so much for this. My problems was mac files created on a terastation. Between this little hack and that program unlocker that got rid of a problem that has been around for 3 years for me. ROCKIN! PS: My annoying files had extra blank spaces at the end of the file name.
UNLOCKER worked like a dream. I downloaded it from filehippo, always a good and reliable solution site.
http://www.filehippo.com/download_unlocker/
Thanks all
hi,
thanks for that tip.
very useful.
regards
tom
Thank you ever so much. Beer forthcoming separately.
:-)
wow i will admit that i was drinking quite a bit but for a minute i thought i was being hacked. i could not get rid of these two files that were .jpg that i got in an email. thank you duncan your command worked perfectly! oh joy! the un-deletable files are gone.
man, you’re a genius, thank you very much for your help, keep up the good work, and again thank you
This solution also works with spaces after file name extensions. Like “annoying_file.jpg “.
I just couldn’t delete that file the normal way either. Always received the “Cannot read from the source file or disk” error message.
Thanks man!!!
Tried everything you suggested, but with no luck… and then I found the link to Unlocker and the darned thing is gone! Three days messing with an empty file that was driving me crazy… thanks for all the help in this post.
I have tried this “ren \\?\e:\win xp tb.bit10.office2007.drivers. 1234.gho” where but the error shown is where 1234.gho is the name which i want to rename it to, the result of the commmand is
“The syntax of the Command is incorrect”
Actually the file i have is a 3.6 gb Norton Ghost file which ends with “.”
i don’t wanna delete this file but only want to rename it.
Please help me coz even unlocker is also not able to rename it.
I have tried renaming the file by “ren \\?\e:\win xp tb.bit10.office2007.drivers. 1234.gho”
the result is
“The syntax of the Command is incorrect”
The file i have is a 3.6 gb Norton Ghost file which ends with “.”
i don’t wanna delete this file but only want to rename it.
Please help me coz even unlocker is also not able to rename it.
You need to put quotes around the first filename because it has a space in it.
e.g.
ren “\\?\e:\win xp tb.bit10.office2007.drivers.” 1234.gho
Thank you man………you are a Genius……………..
thnkxxxxxxxx a lot!!!!!!!!!!
You are a f***ing genius!!! THANK YOU MAN!!!
[let's try again]
Hi,
I am experiencing this same error in MOSS but when I try to rename a file through the explorer view of a document library.
To let you know, the file has a ‘+’ character, was brought into MOSS through drag and drop in the explorer window and is also part way through a workflow.
Not knowing the origins of the document can I assume that this is occuring due to the same reason?
Thanks,
Alex.
If it’s in SharePoint then ultimately it’s stored in SQL Server so I doubt if the “\\?\” will work as this is an NTFS thing. I’d dig into the underlying SQL tables of your SharePoint site to see if you could fix it there.
I finally did it. I had no idea what ‘Command Prompt’ was. Haha.
Thank you SO much. You’re a genius. :)
Like everyone before me, THANK YOU!
This is great. I had this page bookmarked and I knew I was gonna need it again. I had to look through the comments again to realize my annoying file had a SPACE at the end and not a dot. But once I realized that, I was golden. So to all of you out there that may not be getting this done with the dot, try a space.
Thanks again!
hey can some one e-mail me one of those un-deletable files, i tried to make one but i cant, and i can’t find one to download :( … I JUST WANT TO LOOK AT ONE. thanks.
—————–
dude123654789@yahoo.com
———————-
bacm\\
folder will not delete on my desktop “owner\desktop”
it was created outside of windows xp (fat fingered it)
cannot delete it in safe mode
can see the directory in cmd prompt under “all users\desktop”
when i try to open the folder i get: ….all users\desktop\bacm\ refers to a location that is unavailable….
try to rd it per your instructions and get “… syntax is incorrect”
Thanks a million for the tip.
You really saved my life. In my case it was not a dot but a space at the end of a folder, which I couldn’t rename or even delete, and it affected the functioning of a server-based application.
Thank you so much Duncan!
This little file of mine has been bugging me for months!! arr
I looked everywhere for a solution and it still didn’t work, I tried the whole ending explorer process way and even downloaded some applications to do the job, but nothing
Same as hac, it was the space at the end, therefore i was typing it wrongly into cmd and to add to my frustration it was a really long name arr you can imagine!!
anyway thank you so much once more
This page saved my life
Well Duncan,
Not just you saved those hundreds of people above me from an annoying file but you saved mine + teaching me a new thing in the process.
The file have been bugging me for months, I tried cmd to rm dir, I tried showing hidden file, I did all I knew till I suspected it as a virus, but thankfully, it turns out that it’s not a virus but file naming confusion?
Whoever you are, wherever you are, thank you Duncan.
Vielen Dank,
tienzyee
Okay, so it found the folder but it says “Are You Sure ?”
and i’ve tried putting Yes, yes, Y, but NOTHING WORKS. afterwards, it just says “cannot find specified file” or sometihng like that.
[...] Command Prompt. If you are not afraid of using that, it works great! Anyhow, Duncan gives pretty clear and concise instructions here even if you aren’t too comfortable with Command Prompt, you can do [...]
Thanks pal !!! it really helped me to put those annoying files out of my desktop
and one more thing.. the problem arises not only with files and folders ending with a “.”(dot) it also comes with names ending with a ” “(space).. thanks again
This originally got posted over a year ago, and you’re still helping people on almost a daily basis… that’s pretty amazing! What’s also pretty amazing is that Windows doesn’t support the full range of NTFS, considering MS developed the file system in the first place.
Well done Duncan, beer is on the way!
Thanks Greg :-)
I have what looks like 243 annoying files on my external hard drive that appeared out of no where and wont let anti virus and malware scans through. Clearly something happened, and they have become corrupted. I read your tip with very high hopes and I will be VERY happy to buy you a beer if you have a further tip for me since when I run from the command line this is the response I get:
\\?\F:\Movies\Pi\måƒ25Ñ╔Ω. º⌠ – The system cannot find the file specified.
\\?\F:\Movies\Pi\~-1♫┘╡½è.╥♠z – The filename, directory name, or volume label syntax is incorrect.
I’m on Windows XP with SP3
Julie
Julie, try the short filename trick mentioned by Keith on September 20, 2008.
Failing that, it looks like the drive filesystem is corrupt. I would copy all the stuff you want to keep off it to another drive and reformat the bad drive (right click it and choose Format…), and then copy the stuff back.
HTH, Duncan
Wonderful – have been looking for months to get rid of a directory (empty). I finally discovered it had a rogue character at the end (not a .) but which had the same effect. The ? trick finally did the trick. By the way, I suspect the rogue character was inserted by a Nokia mobile phone!
Hi,
Just stumbled across this and wanted to thank you for the great tip.
Not only have I deleted two annoying locked files, but – due to the fact that these files came from a couple of large corrupt .rar archives – they were hogging around 20Gb of disk space, which I have now reclaimed!!!
Thanks again!
hello all .
I tried the command but nothing worked
C:\Documents and Settings\Administrator.SABAHMHANNA>del “\\?\F:\Music\album ▐^^╨
ó’a.σ`í”
Could Not Find \\?\F:\Music\album ▐▲╨ó’a.σ`í
C:\Documents and Settings\Administrator.SABAHMHANNA>?
‘?’ is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\Administrator.SABAHMHANNA>rd /s “\\?\F:\Music\album”
\\?\F:\Music\album, Are you sure (Y/N)? y
\\?\F:\Music\album\ù Yh3S⌂τ._ßπ – The system cannot find the file specified.
\\?\F:\Music\album\ó2▌╒m0ä┬.ï≤¶ – The filename, directory name, or volume label
syntax is incorrect.
…
Patricia, try the short filename trick mentioned by Keith on September 20, 2008.
I have the same problem with the error message,
however its on my usb flash drive…. :|
Urgh! Not working.
Tried to delete the files via Windows Explorer. Got the “cannot read…” message.
Tried to rename files. Same message.
Cannot move, cannot copy, cannot do anything.
Tried the solution given by the author of this page. The files cannot be found.
So I went and moved all files out of that folder EXCEPT those to be deleted, and then attempted del *.* in the command prompt.
That didn’t work; I received a lot of “syntax not correct” errors…and one file not found.
Tried to go up one level and just delete that folder; same problem.
Attributes didn’t seem to make a difference, whether in WinExplorer or the Command Prompt.
(By the way, there are 12 files I need to get rid of, at least seven of which have the faded icon that indicates hidden or system files; but even with hidden or system files showing, Command Prompt only showed 6 total.)
Tried Unlocker. It said it deleted the files; they’re still in there.
Tried the deleter from Cobian Backup utility….
I don’t remember the message I got, but those files are still there.
Tried opening in Notepad and saving as a new, deletable file. Syntax not correct.
What else am I missing?
About the only solution I can come up with at this point is to backup everything I WANT to keep and reformat the disk (it’s a flash drive, so it’s not as big a deal as it would be if it were the computer, but still….)
Help, please?
Tamie, try the short filename trick mentioned by Keith on September 20, 2008.
[...] Had a big problem deleting files that emule created, tried check-disk tried safe mode, nothing helped… until I found this article: http://blog.dotsmart.net/2008/06/12/solved-cannot-read-from-the-source-file-or-disk/ [...]
Thank you, Thank you, Thank you. Had a dozen jpg files that my Father downloaded on his desktop that I could not get rid of till I read this article. Took awhile but that’s cause I had not used a command prompt in years and forgot to put a space after del
this is cool..it worked and i was able to delete files from my desktop
nice ty paps >:D
o m g thankyousomuch
Was able to delete 3 annoying files from my desktop. Hooray for the interweb and the intelligent people on it.
Thank you sooo much for posting this! I was about to try reinstalling Windows to get rid of those files on my desktop after having tried so many other things to delete them!
This guy deserves some kinda award-Thank You! Seriously right now im imagining all the people that have used this to help solve their problem and the combined relief- how do you measure relief, in tons right!? The best part, typical of computers the solution is more simple than the problem and right under the nose. I mean the command prompt, who is gonna discover this problem of “undeletable” files and think right away, i could definitely fix this with cmd. It wouldnt have mattered much, i have basic understanding of dos (havent messed with in years) and even less of cmd but i wouldve never figured out the prefixing for this on my own. Again, Thank You!
i have a problem with a fil called êV4 from my MicroSD and i can’t seem to be able to write êV4 in my Command Prompt… any ideas?
Thanks a lot Duncan. Couldn’t do it for around a month… Great Stuff :)
Thank you for this tip! BEST TIP EVER!!! Been stuck with some legacy files forever and this was the only way to squash it!
Thanks!
Hi, Everybody .. thanks for your posts…
Here is an easy way for deleting files that don’t have an extension or end with … or has a space after the period. Take your desktop and copy all the files except the one you want to delete to a new folder. Then go into the c:\ prompt, and go to your desktop C:\documents and settings\owner\desktop
Then just find the file you want to delete. Make sure there are no other files in the folder and then type C:\del X.*
X= the first letter of the file e.g. if the file is:
Superman-flies… then type C:\del S.*
Or of course if you are sure there are no other files then you can type del *.*
Then go to the temp folder you created and move all your files back to your desktop, and then delete the temp folder.
It worked for me!
Great hint!!!
Thanks guys so much. I have had a damn file for over 2 yrs and unable to delete. The DOS method did not work, but unlocker did the job. Thanks again.
Thank you so much. Cheers :)
“Error Deleting File or Folder – Cannot delete file: Cannot read from the source file or disk“. I get this error when trying to delete files from a flash drive that is on a GPS the files have names like (+si+_5-.C(+ I have try cleaning software but it can not access the flash drive it dose not have a drive letter but looks like a folder with the name My flash disk. I have tried to move the files, to rename them but no success. Thanks for any help I get….
Copy any data you want to keep off it then reformat it (assuming you don’t want the misnamed files)…
good way to get rid of annoying folder. thanks.
Thanks dude!!! Worked perfectly.
I’m trying to move files from one share to another ..and a bunch with the spaces and .’s in the file names will not copy or move …
do not want to delete , as we need these files, but what would work to just move them to another file share?
thanks
Thank you very much…
Thank you. Worked first try. Was driving me crazy til I found your fix.
Hey Author of this awesome blog ! This solution worked great ! Thanks alot !
thanks bro.. it works
thanks all internet legends.. got rid of annoying file with this fix.
Hey, THANKS a million!
Got the file from an email attachment, which was indeed generated by Mac. Didn’t know what’s wrong with the file, didn’t know what to do with the file. Now, clean world returned after following your proc!
Happy New Year!
This is great,BUT there is easyer way to do that,just download and install unlocer(to download it search on google unlocker,and download it from filehippo.com)after doing that,right click on the folder,or file that you want to delete,and click on “unlocker” after that select action “delete” click “ok” and BAM youre done :)
Works perfectly! Thanks!
You have just freed me from a 3 year burden I thank you kind sage. Unlocker has done nothing for me. Nothing I tell you
Thanks, you’re a genius.
thanks very much, you helped me on this issue, clear and concise, 10/10
have a good day
I know this is an old subject, but I just ran into this problem today with a file that I had that ended in a “.” I tried everything I could think of to get rid of this stupid thing…but to no avail.
I want to thank you, Duncan…your solution worked like a charm. I am so glad there are smart people like you out there to help “techno-challenged” people like me!
Thanks again!
Great! It worked . Thanks!!
Great Solution – been bugging me and today stopped a data migration project in its tracks.
Thanks,
-unlocker is for a totally different set of circumstances Alex
Yeah same here, old prob, but still a very current solution.
I came across a situation where I had spaces at the end of the folder name on a win 2008 server.
I had to do rd \\?\”fullpath to directory”
note the \\?\ was outside of the ” ” bit.
Thanks again.
Interesting!
you are my hero of the day!
Thks for the UNLOCKER site…..works like a charm….months unable to get rid of file on my desktop…..it is now gone….this is a great place…..lots of great great info.
once again thks.
Yeah, it’s not working for me. I put the exact path into the command prompt and it keeps saying it cannot find the path specified.
Hate my computer. I’m setting it on fire when I get a new one.
it worked for me . . . i struggled for 2 damn years – thx 4 the heads up
Thank you for this. That file has haunted me for weeks. I’m afraid I can’t afford to buy you a beer but I just wanted to know how much you are appreciated.
You are an angel, I have been trying to remove some annoying folders for over 6 months now and thanx to you I now got it right.
Thank you so much! This solution is fantastic for anyone using Dropbox across Apple OS and Windows. How has an explanation this clear not made it into my search queries for the past year? I don’t know what a beer costs in Abingdon, but I made an estimate. Cheers.
Thanks Russell – much appreciated :-)
Scanned the Program Unlocker with multiple netbot/malware scans. Nothing found and worked like a charm, of course, not making the same mistake I uninstalled it after use.
Was trying to delete a remote manipulation of two ports from a trojan virus called ‘Owner.’ Couldn’t use command prompt to take care of it, no matter how long I tried, but it did provide more information about the commandprompt which is always usefull, thank you.
[Torrentsworld.net] – Harry Potter And The Half Blood Prince DVDScr XviD-PUKKA.torrent
above is the file that i am unable to delete from months….
its of 0 bytes…..
the msg comes as
can’t delete the file…can’t read from the source or disc…
what should i do…
plz help…
plz help
hi all,
i tried deleting a file named “CAMJIRMP.” i am not able to delete it since its showing
“cannot delete file: cannot read file from disk”
help me….
Thanks a lot!! Was breaking my head for almost a day… It worked exactly the way it said. Thanks Again!!
Thank you
This has been troubling me for 6 months
to Arun.A
as our genious friend here who owe many thanks to described the process.
You need to CD (change directory) to reach there, and check if it is a FILE or a FOLDER
& follow our great friend advice
Trust me it works
Bravo, this works for me.
Thx.
Amazing. Thank you so much for posting this!
[...] didn't work, but at least it didn't re-backup files already backed up. After deleting several files that were causing it to fail (had to go to the command line for these, … I again tried the backup. This time it failed on UsrClass.dat (see the actual error [...]
This worked great, and on XP sp3.
I have been trying to figure out how to get rid of 8 Gig of recycle data that Norton left for unerase function, that it did not remove itself, files that were 5 years old.
Dropped a donation in your beer fund, it was worth getting room back on my C drive.
Much appreciated Michael, thanks!
Another wrinkle which was necessary for me to get rid of mine:
Mine was an evil directory, with contents, on XP, and didn’t respond to the method suggested.
Eventually it occurred to me to isolate it in its own directory and use /s on that parent directory. I first looked at the contents with:
dir /s “\\?\d:\o\parent”
and then rmdir’ed it with:
rmdir /s “\\?\d:\o\parent”