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?

If this post helped you and you feel so inclined, feel free to buy me a beer :-)PayPal - The safer, easier way to pay online.


Comment by Nation

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.

Comment by Aris

Great! It worked like magic. Thanks. :-)

Comment by Nation

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.

Comment by Tatyana

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!

Comment by Tech Guy

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!

Tech Guy
Comment by -=N=-


Thanks for the heads up on that Duncan.

Comment by James

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.

Comment by vasssos

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

Comment by DRev

Thank you. Very much.

Comment by Duncan Smart

@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.

Comment by vasssos

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"

Comment by Duncan Smart

@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.

Comment by vasssos

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:


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

Comment by Keith

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!

Comment by Matthias

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!

Comment by Salim

Thanks. Worked the first time. It was smart thinking to use the word 'Solved' in the Header.

Comment by Eugenia

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!

Comment by Eugenia


Never mind! It worked! I just put in the wrong thing.


Comment by whatwouldmattdo

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!

Comment by borg

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

Comment by Jimmy Jim

I just wanted to thank you for posting this. It helped me get rid of an annoying file on my desktop :)

Jimmy Jim
Comment by Chrome

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...

Comment by augerin

great! thanks.

Comment by LC

@Lindsay George the unlocker program worked for me, thanks.

Comment by Korvus Redmane

Thanks. I had a file which i think was some kinda deleated download which i couldn't remove, but this worked.

Korvus Redmane
Comment by Edward

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?

Comment by Jason

doesn't work with Win XP SP3

Comment by Janie

Thanks a lot, it worked a treat on a stubborn folder with a space at the end of its name. XD

Comment by Andrew

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!

Comment by sadtosay

..OMG! that was really helpful!
now my mind is at ease..
thanks a lot..

yer a genius..for me. ^^,

Comment by sherifffruitfly


Comment by Josh

Worked like a charm. Thanks for making this public! :)

Comment by Lyxeas

Hey Martin! Well done the Wildcard at the end was the only way to take it off the Desktop!

Good teamwork all!

Comment by Fred

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 !

Comment by Nicolas

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?


Comment by Kelly

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!

Comment by Ben

@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]

Comment by Annie

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

Comment by austin

you win

Comment by Megan

After several tries I finally got it to work! Thanks :D

Comment by eucarya

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")


Comment by Wolverine

@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..

Comment by vasssos

Thanks ben
I tried that but I get the following:
"The directory is not empty"

Comment by Stickman

Holy Snap! It worked!

Comment by Anon

awesome! finally got rid of that thing :/ many thanks! :)

Comment by sam

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

Comment by eucarya

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.

Comment by GaGirrl


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:

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.

Comment by Johnny

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.


Comment by Johnny

Exactly what's been tried thus far...

C:\>del \\?\C:\Documents and Settings\Desktop\Maps\The Gate d
The system cannot find the file specified.

C:\>del \\?\C:\Documents and Settings\Desktop\Maps\"The Gate
The system cannot find the file specified.

C:\>del "\\?\C:\Documents and Settings\Desktop\Maps\The Gate d
The system cannot find the file specified.

Comment by Bassastingur

Thanks man! You're a lifesaver...

Comment by eucarya

Why does "iexplore.exe" download automatically from this page?

Comment by Martin

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 .

Comment by snkcube

Thank you for the tip! I was able to get rid of these pesky files thanks to you!

Comment by eucarya

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! ! !

Comment by Duncan Smart

@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..."

Comment by Neelima

Thanks a lot for this information !!
Was of great help to me !!

Comment by Kasper

Thank you so much, I was going ballistics over this file, and nothing worked but this! Cheers!!

Comment by Chola

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
The system cannot find the file specified.

C:\>del \\?\C:\Documents and Settings\Desktop\Maps\”The Gate
The system cannot find the file specified.

C:\>del “\\?\C:\Documents and Settings\Desktop\Maps\The Gate d
The system cannot find the file specified.

I resolved it with
del "\\?\C:\myFolder\myfilebad.AVI." /a
Sorry for my english, i'm peruvian


Comment by Neil

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?

Comment by aftab

I wonder if you could rename a file rather than create one ending with a period. Any help? (*srry im evil)

Comment by tacojew22

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.

Comment by Nish

I had the same problem, but with spaces in start and the end of the file name. It removed with Kieth's solution.

Comment by sam

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

Comment by Hari

Thanks for this kool stuff buddy

Comment by Viktor

del "\\?\C:\Documents and Settings\Viktor\Desktop\ The Madagascar panguins "

The best solution! (i was googling for it 2 hours)

Comment by Pat

Cheers Duncan, I've had a file on my desktop for months and tried everything I got by googling but nothing worked - until now :-)

Comment by Scott

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!

Comment by Lauren

Thanks so much, the little twerps have been annoying me for so long.

Comment by Santiago

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!

Comment by Greg

You rock, thanks for the help with this. All the other forums led me astray :-)

Comment by dan

ive tried it and it worked but the folder is still stuck in the recycle bin and it cannot be emptied
please help

Comment by testing123

An extra tip: if the file is hidden use this command:

del /ah "\\?\D:\uit_dienst\pootsm1\Homedir\1\CAH4QDX3"


Comment by Oneil Williams

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?

Oneil Williams
Comment by JA

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.

Comment by Hello_World

thx bro... (damn Mac User..). :D at last.. i can get rid of those files..

Comment by Fulchand

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

Comment by Elevated Sky

I love you!

thanks sooo much!

Comment by aftab

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.

Comment by Mike Hays

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.

Mike Hays
Comment by Stella Volante

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:
Easy to use.

Stella Volante
Comment by Jenny

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.

Comment by Alex

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.

Comment by DILLI

Thank you Thank you Thank you!!! The unlocker program worked perfect. Thanx once again to all of you and your input

Comment by Bill

Thank you so much for sharing this solution, Duncan. A worthy contribution to the public good.

Comment by SB

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!

Comment by Matt


Comment by Dankwa

absolutely fantastic. i tried everything to no avail until i found this solution. Thank you very, very much!!!

Comment by Mark

Thank you Duncan... Two week problem fixed.

Comment by ogeday

unlocker 1.8.7! i've been trying to delete a file for two weeks but now it's gone. thank you unlocker =)

Comment by Haluk Cengiz

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.

Haluk Cengiz
Comment by A1efBet

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!

Comment by crinky

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!!!

Comment by Lynne

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"
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

Comment by BryTech


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!!!

Comment by shopkin527

the command line resolution suggested here did not work for me, but the "unlocker" utility did provide a quick and easy install and fix.


Comment by Lynne

Thanks BryTech! Your solution (after trying many) was the only way I could get these folders to delete!

Comment by BryTech

No problem. I couldn't get the folders removed any other way. Even Unlocker wouldn't do it for me.

Comment by Tim

Awesome solution, thanks!!

Comment by Jayanth

Perfect Solution. Thank You.

Comment by andrew

Thank you so much.

Comment by meirav

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...

Comment by meirav

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.

Comment by Jono

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

Comment by Mohammad

use a third party software called "unlocker" to delete the file permanently, here is the link:


that unbelievably worked for me after trying all other useless ways.

hope it does the same for you

Comment by Neal

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
By using TAB key & then added \\?\ before filename.
Worked fine for me.

Comment by msknyc

Thanks a lot....was finally able to get rid of a troublesome file that's been makin' me nuts for the longest=)

Comment by Eric

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
now type the file you want to delete and it will look like this:
C:\ del \\?\c:\documents and settings\eric\desktop\annoyingfile.

Comment by Eric

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.

Comment by ian

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.

Comment by Michael

So happy... it worked for me. Thanks a lot for sharing it.

Comment by hac

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.

Comment by Beef

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)

Comment by scorpio_india69

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 !

Comment by Todd

You are the best! Thanks!

Comment by mARk

Just had a file that ended with a space this worked on the First Try....Thanks

Comment by TheChaim42

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!

Comment by OngKL

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

Comment by Alex

This worked wonderfully.

Comment by Eric Moran

This works for deleting files very well, but I cannot get this same method to work while trying to remove directories.

Eric Moran
Comment by Andy

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!

Comment by attaboy

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

Comment by Edom

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

Comment by shaun the genius

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

del imatw*.* (press enter)

now should be gone :)

shaun the genius
Comment by myfinalheaven333

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

Comment by Marty

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 "

Comment by James

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.

Comment by Fernnado

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.!

Comment by IamAnerD!!! HA!!!


IamAnerD!!! HA!!!
Comment by Mika

Worked beautifully. This is a problem I have been trying to solve on my windows servers for months. Thanks a bunch!

Comment by Nice




Comment by Kushagra Udai

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.

Kushagra Udai
Comment by Vekos

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.

Comment by bryan

Thanks, I waded thru a lot of info and tried several things before I found your solution

Comment by ota

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

Comment by Alex

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;-)

Comment by Greg

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.

Comment by Jason

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!

Comment by Dietmar

Just had a similar issue with a folder containing a space as last character ("FolderName "). Your tip helped also in this case. Thanks

Comment by Pearl

Hey thanks for the solution! Been looking all over the web for help and you're the best!

Comment by RP

Thanks a MILLION. 'Unlocker Assistant' worked. File deleted successfully

Comment by MWR

Thank you.

Comment by Graham

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.

Comment by Mark G

Thanks. In my case there was very very very very long file name.

Mark G
Comment by Steve

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.

Comment by Myk

100% working.
Thank you so much.. :)

Comment by Richard G

Bingo! (problem solved)

Much appreciated. Smart stuff! Thank you.

Richard G
Comment by LoTek

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.

Comment by Boatless

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.

Comment by Courtney

Duncan, thanks! I've had two files stuck in a folder for months that I hadn't been able to get rid of.

Comment by Anurag Anil

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.

Anurag Anil
Comment by john

Ty for the info...

At last i deleted that pesky file

Comment by Anonymous


Comment by Anurag

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.

Comment by Mac

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.

Comment by Anurag Anil

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:


Anurag Anil
Comment by Stephaen

Great! It works also for files with some weird invisible characters (these files came from my Mac at work).

Comment by rajkuma

ooooooooohhhhh my goddddd..
its working.......
thanks man..
may god bless you.

Comment by ggeorgi

Well done man..... I had this "ghost" and looking for solution a month now..... thanks

Comment by pae

thx a lot....
>,< this solution is great

Comment by Anurag Anil

But,something DID work..like a magic..after goin’ thru d agony of watchin’ that irritating file’s existence on my desktop:


Anurag Anil
Comment by diego


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!

Comment by J

Thanks a lot! Worked for me.

Comment by rcragun

worked for me!!

Comment by Brenda

gee, thanks a lot! :)

Comment by derek

Thanks Chola, that worked.

Comment by Shawn

Again, another big thank you

Comment by Basu

Thank you very much man

Comment by Randy

Thanks!!! worked great

Comment by Dave

Thank you so much - my server just been hacked with 10gb of s**t - this save my life, many thanks man.

Comment by Christopher

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!!

Comment by Evan

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 :)

Comment by 80sBoy

Worked like a charm - thanks!

Comment by ZoRo

Big thanks

Comment by woooooo

this just saved my life. thaks

Comment by Nobody


Comment by Ben

You are a legend, thanks alot for taking the time and effort to post this.

Comment by ben135

Thanks Keith, that worked perfectly.

Comment by J

did the trick!

Comment by luiz

thank you. incredible !

Comment by da bare

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 ;)

da bare
Comment by piyush

hi! i hv a whole folder to delete . i tried using ur suggestion but itsnot happening .... :(
the file names r strange like "*", "STX"
C:\MetaStock Data\april\
pls help

Comment by Vašek

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)

Comment by Scott

Thanks! Got rid of a torrent file I couldn't delete.

Comment by Johnny T

Thanks! I can get around a puter, but not such a hot shot but this worked easy, way to go bro'!

Johnny T
Comment by nick

didnt work so depressed

Comment by aileverte

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!

Comment by RKD


Finally I got rid of those stupid files on my desktop..

Thanks VERY much Duncan..

Comment by Flushing Turd

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.

Flushing Turd
Comment by bibie

thanks a lot duncan..ftr a month, finally i found it. thnks!

Comment by Hels bells

Thanks a million, worked a dream...

Hels bells
Comment by Dave

Thanks alot for taking the time and effort to post this, tearing my hair out trying to get those damn directories to delete.

Comment by David

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?

Comment by Thank you!

wow kickass, this worked!

Thank you!
Comment by Karthik.India

Thank you. this works perfectly.

Comment by Rahamath

Thanks Dude. U r great

Comment by Katya


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"

Comment by Alex

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!!!

Comment by Jim

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!!

Comment by Jacob

Thanks for the heads-up. I had a few of these files that came from.......a MAC. But, not anymore. Thanks again!

Comment by dude

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.

Comment by Alec

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)

Comment by Matt

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.

Comment by Jatin

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.

Comment by Tuc

Worked like a charm, thanks!

Comment by Jonez


Comment by loc

Excellent, it worked! I was getting so pissed off with these Mac folders on my WinXP machine! Thanks!!

Comment by qwerty

RMDIR! THANKyou thankyouthankyou!

Comment by Frances

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!

Comment by Bgr

Oh great! been hunting for this! thanks works flawlessly on XP64!

Comment by bala


I broke my head for several days on this.

Comment by cecileva

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.

Comment by Ennev

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 !

Comment by Racan Aboredaif

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

Racan Aboredaif
Comment by Duncan Smart

You need to put quotes around the first filename because it has a space in it.

Comment by Duncan Smart


ren "\\?\e:\win xp tb.bit10.office2007.drivers." 1234.gho

Comment by Zoran

You are a f***ing genius!!! THANK YOU MAN!!!

Comment by Alex


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?


Comment by Alex

[let's try again]


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?


Comment by Duncan Smart

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.

Comment by Duncan Smart

Thanks for your pleasurably eloquent comment :-)

Comment by tc

I had a file named "gp." on my desktop. Your trick seemed to work, but then my recycle bin showed it had something in it. I opened the bin and there was nothing showing. I tried empytying it and it asked me if I wanted to delete 'Windows', and when I said yes, it told me it was write protected and could not be deleted. Now I can't get whatever it is out of the recycle bin because it's invisible, and I can't empty the recycle bin when I put other stuff in there.

Comment by David

I finally did it. I had no idea what 'Command Prompt' was. Haha.

Thank you SO much. You're a genius. :)

Comment by Darlene

This worked like a charm! Thank you SO much!

Comment by jryprt

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.

Comment by MadMan

Just wanted to say Thanks I downloaded unlocker and it worked Thanks for the info..

All The best

Comment by Carlos

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

Comment by Thing

Like everyone before me, THANK YOU!

Comment by Jatin

Thank you man.........you are a Genius.................
thnkxxxxxxxx a lot!!!!!!!!!!

Comment by Santiago

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!

Comment by Keksich

What if the offending folder is located on another drive? (D: in my case, cmd won't navigate to it)

Comment by Keksich

Nevermind, found the solution! Navigate to C:/WINDOWS, then just put d:, so it looks like C:\WINDOWS>d:

Comment by Keksich

My folder I want to delete doesn't have 8-bit name. Other folders do, but this one has just empty space.

Comment by Keksich

Unlocker doesn't help either.

Comment by Keksich

(Yes, I run SP3)

Comment by Joel

Thank you so much for the help! I've been struggling with a folder for a while. No longer.

Comment by Keksich

Solved it! Opened Nero BackItUp ImageTool and deleted it from there ^^

Comment by lezlow

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

Comment by Travis

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

Comment by jay

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.


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!!

Comment by Jim

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.

Comment by Ruver Uki

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 .

Comment by little_big_man

Thank you very much!

Comment by Steve Tomlinson

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

Steve Tomlinson
Comment by Neal

Nevigate to desktop through command prompt & try the following:

C:\Documents and Settings\Username\Desktop>del "\\?\c:\Documents and Settings\Username\D

Comment by Mahdi

THank you, you helped me so much.

Comment by Frank B

Thank you much!! That worked for a file i had which had a blank space at the end!

Frank B
Comment by srini

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

Comment by srini

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

Comment by srini

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

Comment by noel

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.

Comment by JMPD


Comment by Clay


Comment by greciu

thanks a lot man...

Comment by Jake

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 :(

Comment by kkw

Unlocker! FTW!

Comment by Carol

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!

Comment by jasm


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.



Comment by Ryan G

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!!!

Ryan G
Comment by Ryan G

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!!

Ryan G
Comment by Carolin

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.

Comment by matty

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)

Comment by Alec

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!

Comment by Ritesh Bisu Mishi

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

Ritesh Bisu Mishi
Comment by Jon Swerens

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!

Comment by shashi

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...

Comment by Ravi

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 :)

Comment by Dan

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.

Comment by spatial

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!

Comment by Ahmet

hi, you better try this:

del "\\?\%USERPROFILE%\Desktop\[copy and paste your annoying file name]"

hope it works.


Comment by savan

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

Comment by savan

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

Comment by Carolin

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

Comment by Cannot delete folder

[...] is an easier way to do this. At the Command Prompt, type a \? before the file or folder path. This will allow you [...]

Comment by mentor

Thank you very much.

Finally simple and elegant way to clean the annoying files.

Comment by Dave

Thanks! I had a folder with a space at the end...

Comment by watwat

THANKS. I had a folder with space at the end in my steam folder and it drove me nuts.

Comment by Sapa2ler

THANKS. Finally, I can delete that annoying file on my office pc desktop....

Comment by Pramod

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.

Comment by PK

This Worked for Me !!!
Many thanks Duncan.

Comment by joeboxertbf

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

Comment by Nick Ng

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..

Nick Ng
Comment by climb


The internet is a wonderful place

Comment by PI1960

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.

Comment by Eli

Thanks a lot!
It really workes!
Finally I succeeded to delete these annoying files.

Comment by sam

Hey thanks alot ... This thing was bugging me for the last 3 days, atlast! Thanks alot..

Comment by ETM

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?

Comment by Rob

Wow, how silly of windows. Thank you so much for helping me fix this!.

Comment by Adam

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?

Comment by Adam

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

Could Not Find \\?\C:\Documents and Settings\Administrator\Desktop\CA6FKTS5.

Any ideas?

Comment by sean

Very neat trick :-) Thanks indeed for the information!

Comment by Manzoor

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....


Comment by Zelta

Great thanks a lot!!

Comment by Ibrahim Shah Khan

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!!!

Ibrahim Shah Khan
Comment by Steven Gardiner

That worked great--and the instructions were clear enough that even a command line phobic person such as myself could do it. Thanks!

Steven Gardiner
Comment by rutvi

thanks a lot .....


Comment by Greg

Thank you very much, worked like a charm!

Comment by Lloyd

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!

Comment by Sam

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

Comment by Mike

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.

Comment by Rahul

Thank you Chola. The /a at the end worked.

Thanks a LOT to Duncan. I have saved this page in my favorites now.

Comment by Joe


Comment by Tim

Duncan, you are a god among men. Thank you for this post, it fixed a suuuuper annoying problem I had.

Comment by Stella

Thank you so much. I've had this annoying file on my desktop for MONTHS! Now it's gone. Hurrah!

Comment by Rahul

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!

Comment by Rahul

Hi Mac, thank you. This works. Each file is different. Lobe this page.

Thank you!!

Comment by Paulo

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.

Comment by Rui

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.
Rui from Brazil. sorry by the my worst English

Comment by Afshin

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.

Comment by Lars

It helped me a lot.
Thank you!

Comment by catarina c

This application, unlocker, really helped. Thanks a bunch!

Comment by vampelle

THX THX THX U. i finally able to delete the stupid folder which may have been stopping from defrag my drive

Comment by Jeff Jodoin

Worked like a charm on a folder created from a ZIP that
came from a MAC.

This had some weird trailing space character, not a period,
but the \\?\ stuff worked great.


Comment by Dennis H

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/

Dennis H
Comment by pascolodoro

hi :)
very helpful, thank you for sharing your experience with netizens.

cheers :)

Comment by JK

OMG!!! It worked!! Thank you!!!

Comment by Sharon

It worked - thanks so much for relieving that headache!

Comment by tbone

Thank you kindly. This was a rather annoying issue for me.

Comment by Mike

worked perfect, glad i found this post quickly.

Comment by glen

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

Comment by loran

Thank YOU!!!!!!!!!!

Comment by Jackhammer

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!

Comment by Linux

It doesnot work it says The filename, directory name or volume lable syntax is incorrect

Comment by Pragya

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.....!!!

Comment by meadeslemicah

Thanks a bunch....that's the solution i'm looking for. ,,V,^_^,V,,

Comment by Peter

Thank you so much! I appreciate it! this has been bugging me for a long time now.

Comment by HDNUT

Thanks it worked

Comment by Tim

Trojan virus detected on unlocker

Comment by Eleni

Thanks a million!!! Had a file that was driving me crazy and now it's gone!!! Respect!

Comment by Christos

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!

Comment by Todd

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

Comment by Question

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?

Comment by Lud Betoven

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!

Lud Betoven
Comment by iambrianrice

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.

Comment by Jatin

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.

Comment by Random Man

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.

Random Man
Comment by Saeed


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!

Comment by thankful1

man, you're a genius, thank you very much for your help, keep up the good work, and again thank you

Comment by Brenda

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?

Comment by wim

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.

Comment by Brenda

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.

Comment by D

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.

Comment by D

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!

Comment by D

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?

Comment by chris

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.

Comment by Ned Edillor

thank you so much!
Finally! i got rid of that stupid annoying file!


Ned Edillor
Comment by Ralle-USA

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!!!

Comment by Mick

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.

Comment by Matt

Thank you Duncan. \\?\ is the trick I was looking for.

Comment by Atlast

Sophos Anti-Rootkit did the trick!

Comment by Snoopy

Bravo, this works for me.

Comment by Ang

Thats great Duncan... it is working for me using Win XP SP 3.. Thanks a lot.. LOL

Comment by jason

Thank you so much! it worked!

Comment by Daron

Great post. deleted the dot file that was bothering me for a while now.

Comment by nightrider

THANKS! Great tip.

Comment by stefan

had a similar problem. //?/ didn't work, still same error, so I tried del C:\....\temp\*.* . Problem gone :-)

Comment by Jordi

Omg! I kept trying to type it into the command prompt as ctrl+v didn't work, and I didn't think you could right click haha. I also wasn't aware I had something that looked like a space in the file names either, so it wasn't working! Now it did :D! Thank you!

Comment by Jenny

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!!!

Comment by David Barnes

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)

Comment by Sammy




Thank you. Very much.

Thanks for your help.

Thanks, it worked.

Comment by Francis


Comment by Vy

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.

Comment by Fadi

Thank you
This has been troubling me for 6 months

Comment by Fadi

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

Comment by Mikuz

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:

Someone pluggen my usb stick off when I was copying files >:(
Help? Anyone?

Comment by Niveque Storm

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.

Comment by Vance Longwell

I am terribly sorry to have to leave you feedback, instead of some bread, alas. This is an excellent, excellent, totally efficacious technique. I would strongly reemphasize the importance of the tip listed directly under the CL syntax demo. Here's why.

I've poured over kernel logs, I've typed, and retyped, the command argument until my face turned purple, and my head nearly exploded. All of this because I did not carefully enough read, the explicit, and clear instructions.

I was removing an offending directory/folder using the rd/s command at first, with no result what-so-ever. In the end, and considering this was indeed a folder, rmdir worked for me on XP Pro SP3. For some reason yet unbeknownst to me, manually typing-in the correct file path produced zero results. I encountered the same error that I was trying to go-around.

At this point, using the 'tab' key to auto-complete the file-path directly following the last directory before the actual name of the offending directory/folder, is critical. Again, for some reason, allowing the file-path to auto-complete solved the issue, and the offending directory/folder vanished into the abyss.

This was in fact the result of a ham-fisted Mac-related FTP event, precisely as surmised. Which of course is preventable on the Mac-server-side, doi. So, this article is the perfect solution to a file/folder/directory that won't delete due to the 'can't be found' error.

Thank you so much for this! Totally worked perfectly!

Comment by patricia

hello all .
I tried the command but nothing worked
C:\Documents and Settings\Administrator.SABAHMHANNA>del "\\?\F:\Music\album ▐^^╨
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.

Comment by Nick

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.

Comment by tom


thanks for that tip.

very useful.



Comment by Chris

Thank you ever so much. Beer forthcoming separately.

Comment by tienzyee

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,

Comment by AJ

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.

Comment by Cannot Delete File Solution

[...] 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 [...]

Comment by insan

Thank you, thank you! :-D

Comment by Yogi

Thanks pal !!! it really helped me to put those annoying files out of my desktop

Comment by Yogi

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

Comment by Greg

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!

Comment by Julie

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


Comment by Duncan Smart

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

Comment by Jack

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!

Comment by shep

Brilliant! I couldn't get the original method to work but this worked perfectly first time, thanks :)

Comment by lemon

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.

Comment by MelonHead

Thanks for the tip my friend!

Comment by hellYEAH

thanks sooo much!!!

Comment by Duncan Smart

Patricia, try the short filename trick mentioned by Keith on September 20, 2008.

Comment by Rod


Comment by matt

thank you very much - I had file names ending with a space and this got rid of them.

Comment by Nathan

I have the same problem with the error message,

however its on my usb flash drive.... :|

Comment by Tamie

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?

Comment by Duncan Smart

Much appreciated Michael, thanks!

Comment by Lenny Gray

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"

Lenny Gray
Comment by Duncan Smart

Tamie, try the short filename trick mentioned by Keith on September 20, 2008.

Comment by Duncan Smart

Yes, that tip's in the article: "Tip: as youre typing the file/directory name use the TAB key to auto-complete the name (press TAB repeatedly to cycle through possible names)."

Comment by Michael

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.

Comment by Thank you Thank you!!!

THANK YOU SO MUCH!! AMAZING Advice!!! totally worked at got rid of my annoying long-extension file!!!

Thank you Thank you!!!
Comment by Thank you Thank you!!!

I was having a similar problem of having to annoyingly type out a long file name and always getting it wrong or it not allowing me to paste in the command prompt.

HOWEVER, one of the individuals here suggested pressing the "TAB" key which completes the rest of the file name for you once you've typed in the first few letters/characters so you don't have to type the whole thing out!! Not only does this accurately type out your file name, but it'll save you the headache of not having to paste!

hope this helps!

Thank you Thank you!!!
Comment by Duncan Smart

Backup the files you want to keep and the reformat the USB drive (right-click the drive in My Computer).

Comment by SpyPower

Oh thank you. I couldn't think of another way of doing this. Damn NTFS format.

Also, if that's the case, you can remove those files from FTP, sftp, etc etc, Or any network path.

Either way, THANKS

Comment by cmcculloh

Amazing. Thank you so much for posting this!

Comment by Xlnt

del /ah "\\?\D:\path to file" work like a charm for me.
Thanks guys!!!

Comment by Navin

Thanks a lot!! Was breaking my head for almost a day... It worked exactly the way it said. Thanks Again!!

Comment by sunil

this is cool..it worked and i was able to delete files from my desktop

Comment by Anex

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.

Comment by silvr

[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...

Comment by silvr

plz help

Comment by Arun.A

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....

Comment by Lesley

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.

Comment by Wendy

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.

Comment by Russell

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.

Comment by Duncan Smart

Thanks Russell - much appreciated :-)

Comment by Shana

it worked for me . . . i struggled for 2 damn years - thx 4 the heads up

Comment by Ren

nice ty paps >:D

Comment by me

you are my hero of the day!

Comment by JR

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.

Comment by David

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.

Comment by dante

You're brilliant. I couldn't figure out how the he-- to delete a zip folder that contained one buggy file. Damn, I sure miss the days of C:\ press any key to continue...

Comment by alex

I've tried the solution deleting files off a USB drive and have had no luck.

Any one have a suggestion?


Comment by Brian

o m g thankyousomuch

Was able to delete 3 annoying files from my desktop. Hooray for the interweb and the intelligent people on it.

Comment by Leddo

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.

Comment by Martian

XXXXXXXXXXXXXXXXX MARTIN'S tip was the last piece of the puzzle I required in addition to the main blog XXXXXXXXXXXXXXXXX

Comment by Debbie

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!

Comment by David

Great Solution - been bugging me and today stopped a data migration project in its tracks.


-unlocker is for a totally different set of circumstances Alex

Comment by Jimmy

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!

Comment by oesoep tjhai

Great! It worked . Thanks!!

oesoep tjhai
Comment by Cossu

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?

Comment by Kapitan Kosmos

Thanks a lot Duncan. Couldn't do it for around a month... Great Stuff :)

Comment by Iggie mann

Thank you for this tip! BEST TIP EVER!!! Been stuck with some legacy files forever and this was the only way to squash it!


Iggie mann
Comment by NetSoul

Hi, Everybody .. thanks for your posts...

Comment by Kent

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!

Comment by Midge

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!

Comment by John

Great hint!!!

Comment by chris

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.

Comment by vegiVamp

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'.

Comment by goran

Thank you so much. Cheers :)

Comment by Larry

“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....

Comment by Duncan Smart

Copy any data you want to keep off it then reformat it (assuming you don't want the misnamed files)...

Comment by mm

this worked perfectly! thank you!! (the other suggestions on this blog and correspondence weren't working for me)

Comment by tahir

good way to get rid of annoying folder. thanks.

Comment by Karen

Thanks dude!!! Worked perfectly.

Comment by officejedi

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?


Comment by sms

Thank you very much...

Comment by Anonymous62265

Thank you. Worked first try. Was driving me crazy til I found your fix.

Comment by san

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.

Comment by bgbg85

Hey Author of this awesome blog ! This solution worked great ! Thanks alot !

Comment by troy

thanks bro.. it works

Comment by zulu

thanks all internet legends.. got rid of annoying file with this fix.

Comment by Good Grief!!!

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!!!!!

Good Grief!!!
Comment by teil

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!

Comment by Aleksandar

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 :)

Comment by chiemartin

Works perfectly! Thanks!

Comment by premo

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

Comment by mariachipr

Thanks, you're a genius.

Comment by martin

thanks very much, you helped me on this issue, clear and concise, 10/10

have a good day

Comment by Sanjay

Thnx a lot mate !!

Comment by Dan

I'm still getting the Could Not Find error in the command prompt window. I have nine of these files ending in a "." on my desktop. I've used the tab technique to locate them, but still get the error "Could Not Find file". I also used the %USERPROFILE% trick, but still get the same error. I'm not sure what I'm doing wrong. I've tried this from the C: file, and from the C:\user\Desktop file location, but no luck. Any I've got Windows XP. Any help would be appreciated. Thanks.

Comment by Dan

OK, so I went back through and tried Keith's short name trick from Sept. 20, 2008, and it worked beautifully. I suggest adding that to the original post at the top. I hadn't seen it until I started going through all of the posts (which are quite a few at theis point). I guess that's a testament to how widespread the problem is, and how poor Microsoft's support is. Oh well, no surprise there. Thanks again, Dan

Comment by RoCkAmI 88

@ Aleksandar Thanks Dude

Easy & Efficient


RoCkAmI 88
Comment by Jimmy

Thanks for the solution to this. A few folders have been bugging me for years, although I only just thought to google it. When I have a job I will contribute to your beer fund!

Comment by Bala

Worked like a charm, I will definitely sleep well tonight!!

Comment by JG


Comment by JG


Comment by JG


Comment by WODBON

AWESOME. i HAVE xp sp3 and this worked
del "\\?\C:\Documents and Settings\Administrator\Desktop\Garmin " Make sure to copy and paste the file name. THX A MILLION

Comment by Peter

Great! Worked like a charm! For those for whom it didn't work - don't forget the open and close quote! I wan't including those and was getting the error a lot of you describe!

Comment by Jazz Trai Yin

for my case..deleting the file and waiting for the error to come out "Cannot Delete : cannot read from the source file or disk" then right clicking the file and open with: notepad deletes it.. not sure if the file is there but i saved it on desktop and it doesnt seem to be here anymore..

Jazz Trai Yin
Comment by Jazz Trai Yin

hold on DONT try this.. it might change your default files to open as notepad and you got a real problem at hand..

Jazz Trai Yin
Comment by Angel

C:\Documents and Settings\user>del vaginaboob.
Could Not Find C:\Documents and Settings\user\vaginaboob.

that's what it says. please help!

Comment by Angel

OMG! IT WORKED! thank you sooooooo muchhhh<3

Comment by Rob Neal

I downloaded a couple of zips that contained Mac alternative files. Now they will NOT move. Unlocker refuses to show up in the shell, and the DOS CMD prompts just either continue to say "file not found" or "Wrong syntax"

However, I am using Windows XP64, so I wonder if that makes a difference.

Rob Neal
Comment by Rob Neal

Well that was quick! I never even thought to try this, but did it as a last ditch desperate attempt.

I suspect some filenames have hidden characters, so from the command prompt, use DEL XYX*.* where XYZ is the first few letters of the filename. Et Voila! It worked!

This might also work with Duncan's suggestion using the \\?\ prefix.

Rob Neal
Comment by Steve

Thank you so much! After downloading an order confirmation as an image, I found a bunch of additional files in My Pictures folder (Xp/sp3) with no extensions after the dot. Googled the "cannot delete.." error msg. and found your del cmd remedy "\\?\..." as the top Google link. It worked immediately!

Comment by Tim

Thank you, your solution was really helpful and saved a lot of my nerves

Comment by Joe

Great, Keith, you are a smart fellow.

Comment by Lawson

thank you so much...this helped me alot

Comment by Hafizah

Thank you! =)

Comment by Steve

Thanks a lot the file has been annoying me for a year.
My first attempts failed(using XP). The Tap trick did not work with the . My file was on my second hard drive where my My Documents resides. In command prompt I first went to my second hard drive enter, and D:\> appears on the next line. I then hit tab untill the folder I wanted came up "My Documents">, I then typed in the back slash "My Documents"\> and hit tab again untill the undeletable file came up "My Documents\Fw_Life After Road Runner."> I then ran the curser back and typed in the del\\?\ like so del \\?\D:\"My Documents\Fw_Life After Road Runner."> pushed enter and to my disbelief it worked.
I have tried many times before typing in what eventually did the trick and got cannot find the file. The Tab was the key. Thanks again.

Comment by Kostas

This is without a doubt the most useful and simple explanation of a problem solution ever! love it, thanks a lot!

Comment by Reis~

Thank you so much for this info!!!

Comment by nick

This came in handy, on some files had an access denied on the file server. Launched a command prompt as the original user and was able to finish deleting them

Thanks for the post!

Comment by joe

The file I want to delete has a name that is too long so when I try to paste it into command my computer beeps a whole bunch and it wont all go in

Comment by kita

I know this is a really old post but, I have to say thank you to both Duncan and Martin for your tips! Worked like a charm :)

Comment by Alex

Thank you very much! It worked!!!

Comment by Mattias

Thanks alot, this really helped me!

Comment by Avakai

MY GOODNESS! THANK YOU THANK YOU THANK YOU THANK YOU DUNCAN THANK YOU A LOT!!! i've had this problem for days now... i backed up my files and reformatted the usb jus like you sed and it worked!

for those who don't know how to do it, go to:
My computer >>> right click the USB drive >>> click 'Format' >>> choose the options you want(i suggest choosing the best ones.) >>>> Press 'Start' >>> "all data will be erased..."... press 'ok'


Comment by Paige

OMG!! Thank you Keith! So glad to be rid of these files!

Comment by Ike

Thanks, it worked ok. User is happy.

Comment by Alex

awesomeness. I had a little file whose name had [brackets] in it, and was very long... whenever there is a file I can't delete, it brings back unhappy memories of viruses, mysteriously reappearing startup items, safe mode, complete windows reinstalls... AARrrrgh. I figured it was just the brackets or the length of the name causing the problem, but still, I wanted it gone!

By the way--- copying and pasting the exact file name is a good idea-- at first the method above didn't work for me, but copying the file name revealed one little space at the end of the file name-- "filename.tmp " <-- one little space makes all the difference to these nitpicky machines.

Comment by Henry Christensen

You are a hero!! Maybe even a genius! Thanks for this solution!

Comment by Darren

I have read loads of threads and tried many solutions to this problem with no luck,
This was a very quick and easy fix, I couldn't believe the file had actually gone.
Many thanks.

Comment by anthea

i've tried the unlocker and even format my USB flashdrive and the command prompt but its not working!! pls help me

Comment by DonySmith

thanks! this really helped...
thank God this post is still here.

Comment by Lee

Wow, love the Internet. This was my exact problem as well, though on a Windows 2003 server. Used your advice and problem solved. :)

Comment by RogerRabbitsClone

HAHAHAHAHA! oh man, the first comment i read this. i laughed so hard i almost fell over.

Comment by Daniel

Thank you!

Comment by Me

I had no trouble using both commands in the example. I just used what the actual paths were on my pc after the C:\

Comment by Zcippy

Thank u so much!!!! You should get employed by microsoft! ;D

Comment by ian

this really worked very well... thanks!!!

Comment by Ed

I've been trying to delete a folder and kept getting the "Cannot read from source" message. I spent about
three hours searching websites for an answer to this
problem. Booted up in safe mode, tried dos commands
(rd and redir) over and over, tried to move, rename,
delete, etc, in Explore - all to no avail. I was going
to format and reload the drive shortly and was really
aggravated. Then I found your WONDERFUL website. All
I can say is thank you very much!!! And I sent you $25
via paypal - you earned - thanks again...

Comment by Charles


Comment by george

if once you manage to remove the initial files using the above sollution (ta for that btw) and you still have hidden temp files left that you can't get rid of, renaming the directory from CMD will do the job.

hope this helps

Comment by Ravish

Thank you!

Comment by Bart

Yihaa !! Wonderfull
What a tip

Thanx !!

Comment by Kandygirl

OMG THANK YOU!! I had 2 empty folders stuck in my documents that were a result of failed encoding of torrent files. I thought I would have to look at those things from now on- how annoying! I used the rd /s "\\?\ tip from your post only mine was a space instead of . at the end. Worked PERFECT! Can't THANK YOU enough! Thank God for computer geniuses like you!!!!

Comment by Sunil Kumar Yadav

Dear Sir,
Thankyou for your HELP.

Sunil Kumar Yadav
Comment by drew

PERFECT!!! Works for me, thank you very much.

Comment by jordan

Thanks for the tip!!

Comment by lime

hi could you help me with this please. I tried what you said on the above instruction but this is what it said in the prompt command. http://i48.tinypic.com/4lg2g1.jpg

It said that the system cannot find the file.

Help please.

Comment by Duncan Smart

Use the TAB key tip mentioned to auto-complete the file path.

Comment by lime

done! XD
I've missed some of the process. I didn't know that I can drag the item to the cmd instead of manually putting the file's address.

Thank you very much!

Comment by 김군실

저 제가 지우고 싶은게 있는데 잘안지워 지더라구요

Comment by Andrew

Yes! My desktop has 44 of these files on it and they have really been annoying me. What I have been doing it every time I turn my computer on, I would grab them all and scoot them off of the desktop. But now I can begin the slow, arduous process of deleting them. Thanks!

Comment by Christian Vestergaard

Thank you very much for this help. I had to try it several times before I got the '\\?\' in the right place but when I got it right it worked well. Thank you.

Christian Vestergaard
Comment by Jos

A wonderfull simple solution. In a few seconds I wiped a lot of annoying 'non existing' files shown for years in my documents folder.
How one person can be smarter than sum the Microsoft heldesks all over the world.....

Comment by Duncan Smart

Look at using the rename command (look for the tips above on using the TAB key to get the filename right): e.g.

rename "\\?\C:\foo\bar\myfile.ext" mynewfile.ext

Comment by Wendy B

I am eagerly awaiting a solution to your problem as well! I've done everything listed here, including that accursed Unlocker link--it did nothing but add MORE crap to my computer (thank GOD I was able to get rid of it), never mind coming up in a foreign language! I have this evil file on my MP3 player, and no matter what I try, it won't go away! Someone HELP!!

Wendy B
Comment by norviral

Hi all of you i get this error if some one can help me please please
Cannot read from the source or disk.
When i put my cd in to cd rom i use to get this error and i want to copy the file to my hardisk but i can not be copy help me plse guys ..email kandasoo@hotmail.com

Comment by Help Pj

The folder name is : CON

Help Pj
Comment by Youssouf Salah

Thank you very much man you have helped me so much with the annoying files I had
and Thanks again for the last evil trick

Youssouf Salah
Comment by Kenneth

thanks for the help! :)

Comment by Taieb

THANKS a lot Man, really you' ve helped me so much, you are the man!

Comment by Aaron Reciproco

thanks for your command line, dude! I managed to delete one annoying file on my desktop. You're the MAN!

Aaron Reciproco
Comment by Atropos

I had to use the /a technique after the final quotation mark. What a relief!

Comment by jon

thanks very much! i've finally gotten rid of those annoying files i couldn't delete!!!

Comment by Dave T The Don

Tried what you suggested, but couldn't dig down to the d drive in cmd, it keeps on returning to c:\ when cd d:\. But I got to thinking, if it was a mac file left over why not delete it from the mac!!! Heypresto, the macshare found the file and I deleted it using the mac.

Dave T The Don
Comment by Thomas

I'd like to suggest one other solution (maybe it's mentioned somewhere in the 528 previous comments). Download and install the process explorer, technet.microsoft.com/.../bb896653.aspx
Select "System" and look for a file handle for the directory or file you're trying to delete. You'll see what I mean. Right click on it, and select "close handle". The dir/file should be removed automatically through this.
If you don't find the dir or file in "System", try finding it under "explorer.exe" instead.
Best of luck!

Comment by Chulwoo Lee

Thank you so much!!!!!!

i finally deleted my annoying file for god sadk!!

thank you again and hope u have a nice day!!

Chulwoo Lee
Comment by SGerber

I have directory and subdirectory with a trailing space and nothing worked for me !

And I find a solution :

Download form sysinternal sdelete : technet.microsoft.com/.../bb897443.aspx

and type on a command prompt :
sdelete /s \\?\x:\path\root_of_the_bad_dir"

sdelete deleted all the subfolder with a trailing space

I'a on Windows 2008 64 bits
YES it works !

Comment by steven farmer

This didn't help I hoped it would but I still can't copy the file from my portable hdd to my friends laptop

I've tried renameing and changing all the properties please can you help

Email jedisteven@hotmail.com

steven farmer
Comment by Wilson

I have no words... to thank you.
My FILE """Vanished away"""
My XP was been SP3.
Jason, Try it All the best.

Comment by Duncan Smart

If the offending file is on a USB drive then just copy off the files you want to keep and then (right-click) format the USB drive, then copy the files back.

Comment by Perng

How should i change to the command so i can copy the file from my external hardisk to my laptop? it says "Cannot copy file : cant read from source file or disk.
thanks so much for ur time :)

Comment by Duncan Smart

Try using the ren command first: e.g. ren "\\?\C:\blah\de\blah.ext" newname.ext

Remember to use the TB key trick mentioned to auto-complete the path as you're typing.

Comment by Kirtan Doshi

Thanks a lot mate! that was an invaluable lesson. :) Ur da Man!

Kirtan Doshi
Comment by Frank Black

Jesus... I can't thank you enough for delivering the solution. I've never seen this before... it happened following a program I installed yesterday and as I directed to use a data folder named aaa it created another folder named aaa(dot)

Safe boot, nada
Powerdesk DESTROY, nada
Rename, forget it

It kept coming back following a refresh

Anyway, this solution worked and UNlike some other M.F. toolheads out there... this solution did NOT delete my entire drive.

Many thanks. Many blessings on Stuart for providing this assistance.

Peace Telemental

Comment by soli

Hey buddy that was great, thanks a ton!

Comment by Vicky

Sorry to be late responding, but i was out of town.
OK, I am over my head here. There are a lot of tmp files and folders there in the temp directory; nothing with the name of the folder I am trying to delete nor none with the same creation date. Am I supposed to delete them all, or am I looking for my bad file? If I am looking for something that has the properties of the bad file, it is not there. (Also, I previously tried to delete it from the Command prompt, thinking it was in the "D" directory, and the error message was "file not ready.") Thanks,

Comment by Distortion

Doesnt work to me....
" Could Not Fine Annoying File "
Please help me..

Comment by LMB

Hi! I would just like to say thanks. I followed this steps and successfully deleted a mp4 file that has been stuck in my desktop for quite some time now.


Comment by Rex

Add another to the list... tried MoveOnBoot, booting into Safe Mode and setting permissions for the whole folder to delete one file.

Google'd for a solution, found this page, followed the directions: presto file is gone...

Thanks :)

Comment by Vincent

This is so useful and easy thanks....

Comment by Katie

Win!! Thank you so much. I finally got rid of the file that was preventing me from fixing a drive.

Comment by Hemant


Comment by Sakthi

Thank you very much. i have finally resolved. great stuff.

Comment by Catt

Thank you! Geez that was annoying. Now it wouldn't let me delete the file per-say, however the folder deletion worked just as well. thanks so much for the help!

Comment by nada

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Comment by Duncan Smart

The thing to do is try and find where the temporary files are kept. Have a look in the user temp folder (Start > Run > "%TEMP%" > OK) and try and clear everything out of there - hopefully you will then find the offending file and you can use the Command Prompt to delete it using the tips above.

Comment by SKumar

Thanks, that works! :)

Comment by Abigail

Great minds at work! Thank you so much.

Comment by Vicky

Ok, I have a similar problem. It's the same cannot read from source file or disk" file type that ends with a ".". However, it is sitting in the temporary path of my CD writer...I guess it is owned by the "D" drive. It is blocking my ability to write to the CD, and I get not delete, move, or do anything to it. I can not access the file in any manner....but I am not proficient in DOS. So, how can I get to this file to delete it? Thanks,

Comment by Stewart

Great stuff thanks! Worked as mentioned above for files created by a MAC with a space at the end.

Comment by andri

Wow... thanks so much brotha, my problem solved... many thanks

Comment by sujay

thank u .. the command helped me to remove the file from E: drive which was earlier giving a error msg when try to delete.. thank u again

Comment by JB

Genious. worked like a charm. THANK YOU!

Comment by Duncan Smart

What version of Windows are you using? What do you use to write your CDs?

Comment by Vicky

I am on windows XP on Dell hardware with an internal CD wiriter. I am not doing anything special writing to CD's, just burning files to a CD. I normally archive photos, word docs, etc on CD's and was trying to send a word doc file to the CD when this file got stuck or created. The file name is a two word name, followed by a period.

Comment by David

I have tried everything reading down through this thread but unless I missed it I have not found what to do when the computer days can not find "del". I have copy pasted the entire string to put at the dos prompt and then pasted in the path to the folder that I can not delete, but all I get is "can not find "del'"

Thank you!

Comment by Ivan

hi i need help this file is a virus and i cant remove it. cant delete it and kav cant delete it too ...

i get this error
Cannot read from the source file or disk
what should i do ?

Comment by jv

I have the same issue as jasm, but my files are on a USB drive. The file names are all garbled up. Any suggestion?


Comment by babi

thankx duncun it works well

worked ur this solution

@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.

Comment by Bvvood

Thanks for this! I've created a file in remote server through and ftp program with a dot at the end of filename. Once I've created it, it suddenly cannot be deleted.

Thanks to your tips, I'm able to remove this file. Damn windows bug!

Comment by USB

For all you with a USB, if you have a file on it that you can't get rid of, just format it...

Comment by Chris

This helped me, thank you!

Comment by Michael Trahan

Thanks a Billion! I am very experienced, but self-taught; and I was stuck with a "file"/non-file thing on my XP x64 Desktop for a few months. Finally I thought to search the error message (duh!, but guess I was lazy at first and my desktop was messier then anyway).

Well, I am posting this for thanks and two other reasons - for all reading with this kind of issue:

1 - For me the file ended with a space; and not a period; and thought I would spread the word this still worked!

2 - Also, I read above some had problems with copy and paste. I too had to re-learn how to do this, but you should be able to do it simply with the windows command prompt (well, at least mine, see version above). I use the portable one from portableapps.com, and also discovered it to be tricky. It seemed to keep "forgetting" or something, what I had copied into the clipboard (which was the entire command written in a text editor to include everything (of course)). I had to carefully left click the very top left of the prompt window to bring up the context menu which included Edit->Paste. Maybe mine was acting up for some other reason, but I think this may help others; keep trying.

So happy that "file" is gone!

Michael Trahan
Comment by Pasquale

I successfully solved the problem "Cannot delete file:Cannot read from the source file or disk"referred to a file on desktop, adopting the following steps:
- go to prompt command
- write DEL "\\?\C:\Documents and Settings\Administrator\ name_of_file"
- clic two or three times

and the bad file vanishes.

Good luck to everybody.

Pasquale, Firenze, Italy. 29 Luglio 2010

Comment by Pasquale

Errata corrige:
DEL "\\?\C:\Documents and Settings\Administrator\Desktop\name_of-file"


Comment by Rupert

The \\?\ trick worked for me. I also had a file with a "dot" extension that no other method would remove. (Short names disabled.)

Comment by Sudhakar

Thanks a lot it worked for me :) :)

Comment by THANKYOU

THANK YOU! That annoying directory is now GONE GONE GONE!!! THANKS!!!

Comment by Surendra Panda

I am having the same above issue but with a flash drive... the file names are bit weired & I tried using the above method to delete them but didn't work

File names are also unusual like some codes, please provide me a email address where I can send you the screenshot.

Please help!!

Surendra Panda
Comment by Duncan Smart

Actually I just did a Google for the temporary CD burning folder in Windows XP and it appears to be here:

C:\Documents and Settings\User Name\Local Settings\Application Data\Microsoft\CD Burning

Maybe the file in question is in there?

Comment by Riley Hensly

If you have a solution to this problem please share it this way. I'm having the same problem on my flash drive. THANKS!

Riley Hensly
Comment by Duncan Smart

Simpler solution may be to copy the data you want to keep off you flash drive and re-format the flash drive (right click it and choose Format).

Comment by Riley Hensly

Thanks Duncan - will reformat at this point.

Riley Hensly
Comment by Vicky

Found it!! HOORAY!
Now to delete it; My CMD default setting is Documents and Settings\Vicky> My bad file name is BlockNewman.

So, after the CMD prompt, I tried: DEL /Local Settings\Application Data\Microsoft \CD Burning\BlockNewman.\ The message I received back was: Invalid Swith - "Local"

I have tried various other strings, including using "\" at the beginning of the string, putting the entire string in quotes, etc., and the messages are: The system can not find the file specified

So, I obviously don't know how to delete from the CMD prompt! Suggestions? Thanks,

Comment by Duncan Smart

Should be something like this (all one line, and the quotes are important):

del "\\?\C:\Documents and Settings\Vicky\Local Settings\Application Data\Microsoft\CD Burning\BlockNewman."

As you are typing you should be able to use the TAB key to auto-complete stuff as you go.

If it's a folder then use the rd command, e.g.

rd /s "\\?\C:\Documents and Settings\Vicky\Local Settings\Application Data\Microsoft\CD Burning\BlockNewman."

Comment by Vicky

Thanks for the suggestion. I tried the command for the file delete as you outlined and the message is network path not found. When I try the folder command as you suggested, I first get the are you sure message, and when I respond Y, the message is:The system can not find the path specified."

When I look at the file, it looks like a file, not a folder...and I double and triple checked the file type, so I know we have that correct.

Comment by Duncan Smart

Just make sure you type the del command correctly, computers are very unforgiving:
* Important bit to get right is \\?\C:\ at the start
* remember the quotes
* make sure you're using backslashes, not forward slashes,
* use the TAB key to auto-complete.
Maybe find someone who knows a bit about computers to help you.

Comment by aethan

It worked for me! Thanks a lot

Comment by Jeff

How do you use this syntax to copy one directory (with multiple internal directories) from one drive to another drive? I have tried every variation of \\?\ and cannot get anything going.

Comment by Duncan Smart

Something like:

xcopy "\\?\C:\my source directory" "\\?\C:\my destination directory" /s

Comment by marvin


Comment by Veera

Martin's idea of '?' worked awesome.. thanks a lot man....

Comment by bts

Brilliant tip........................... thanks

Comment by Dave

Thank you so much this allowed me to clean up a hard drive I was having trouble with!

Comment by Duncan Smart

Chris, Sharepoint stores everything in a SQL database rather than the filesystem. Maybe you can rename it via the web-based UI instead of the explorer view. Or as a last resort - use SQL Server Enterprise manager to track down the database record and rename it there?

Comment by 421

thank you, worked perfectly.

Comment by Lito

thank you very much for a very simple yet effective technique!!!!

Comment by junkmail@junk.com

thx for the original thread. this helped steer me the right way. BTW, if the "del \\?\" trick doesn't remove the file since it cannot find it, try the "rmdir /s \\?\" or "rd /s \\?\" trick, which removes the entire subdirectory and offending files. this worked for me. another common problem with these rogue files is you dont have permission to access them. in this case, you need to assign permissions with a stronger utility called "subinacl", whcih can be downloaded from microsoft website.

Comment by Chris

I am having this same problem,

have you found a solution Alex?

Comment by jack

To be sure, all systems, including Windows, contain annoyances. Then again, you have to be a pretty major linux or apple fanboi not to notice the incredible power and ease of use in the Windows-Office ecosystem. As a person who has and supports all three, I'll take Windows on my personal device any day, even with this stupid error.
Uh, no, I don't work for microsoft.

Comment by Aries Mars


Aries Mars
Comment by Aries Mars

Dear Sirs;
Firstly, Please accept my apologies for not understanding what The HTML tags and attributes below actually do? I an certain that ithey are for making a post more convenient? Please excuse me if my lack of knowledge regaerding them, creates an inconvenience in your Fine Posting area?
Well,..now,... as to why I' m actually here, & Posting!! Your method in putting the del \\?\ in front of the Prompt worked! YEEEE - HAWW!! :o)
FRIGGIN ! Un - Believeable!!...I had to try it a few times ..but only because I'm a Dummy!... and have never used this Prompt Program before! I now realize that I had to use a Capital C:\ immediately after the del \\?\ and ,......I finally figured out !!....as well that that I needed to place a period and the " at the end of the fIle name ,...even though the File that was permanently stuck to my desktop, did not habve the period. or the " !!
Anyways,...after about the fifth try,... I had it! :o)
I looked at the prompt, thinking that it would once again state something to the effect that it couldn't find the path~!
But to my Delight!!! Mister Duncan Smart's Advice was worthy of my complete attention!!
So I Thank you Sir! For a Very Much Appreciated Method ( that Indeed Works! )
That Cursed File ...Had sat immovable...on my desktop for the last two years or so!! When I Glanced down at my Desktop,...immediately after I had succeeded in Moving it,....I Did a Little Dance! And then I noticed that my Desktop Looked Strangely Organised again!! Yes! that Little Unwelcome File, had stayed it's last day on MY Property!! HA-HA! :o)
Over the Last Two years.... I had tried just about EVERYTHING!...BUT TO NO AVAIL! .....UNTIL NOW!!!
I tried changing the File's extension's ...tried renaming the File.....changed it's "opens with"...numerous times! I have used Different ......."File Shredders"..........and I have used a couple different File "Unlocker" Programs...and used my Window Washer program with specifically - directed washes geared towards bleaching it out!!...I have even used 3 different registry editors thinking that they would delete it after they discovered that it no longer had a specific "target".......I have also made a shortcut to it thinking that I could then just delete it's "target".....but all to no avail!!! ......Until Tonight!!! yeeee!!!---HAAAAAAA!!! :o)
I have even changed the Files extension to one that only one specific Media Player could Play!...and then deleting all those types of files...and then as well , the corresponding media Player itself!!!!

Yes! Just about every trick in the Book! .....That I knew of or heard of, anyways!!
So,...I just wanted to Personally Thank you!!! Mister Duncan Smart!!...

Aries Mars
Comment by Aries Mars

OOOpps ! I got cut off before I finished typing!!..I juist wanted to add ...that anyone would be foolish to not try your Method! Mr Smart!....As you Truly Must be A Smart Mister!

Thank you very Much for enabling me to be free of that damned File! ..........Finally! :o)
Sincerely, Aries Mars

Aries Mars
Comment by Bev Timerding

Amazing! Have tred all sorts of File Assassin variations to no avail and voila - your solution worked beautifully. You are still getting thank you's over 2 years later; pretty impressive.

Bev Timerding
Comment by Jason

"\\?\%USERPROFILE%\Desktop\Annoying file you can't delete." it worked for me !!

But really this little number did the trick rd /s "\\?\C:\Annoying folder I couldn't delete" and I was able to remove a pesky folder that wouldn't go away.

Thank you for taking the time to post this. It was a great help to me.

Comment by sheth


Thanks for the code..it worked..gr8 work..


Comment by tanja

I have one more question .. if I am using the command del G: \ in
command prompt and erased all from the memory card but not deleted that "impossible" folders, can I to retrieve the deleted data : ( ....I'm using windows xp

Comment by oggmeista

dont know if this will help but I tried my own way of deleting these files and it worked!!

What i did was create a folder moved all the other files in the problamatic folder into this other foler then I moved it to another directory on my harddisk

then i goto the probem folder and copy the address bar for the folder

opened command prompt and typed cd (right click paste then Enter)

then i simply typed del *.* (then enter)

files were gone!! :)

hope maybe this might help someone else

Comment by ina

Thank you! It helped :)

Comment by Ty

I am having the same issue with a file on my desktop, however this method does not work for me! I tried typing the file name and path directly and it says it does not exist, even when I use tab to cycle to the correct file it says cannot find file when I try to delete it. Looks like I'm stuck with these 5 files on my desktop.

Comment by gocoogs

Great help, thank you!

For those of you that are still having problems, an alternative solution is to install cygwin (http://www.cygwin.com/), change to the directory containing the problematic file (or the parent of the problem directory), then issue the command:


use the problematic file or directory name without quotes.

Comment by Rorz

hello sir in my deskstop there's a file which is somewhat a virus or what else do you call this which i cannot delete....

same as yours it prompts "cannot delete file:cannot read from the source file or disk."

I tried using the command which you have post but it does'nt work....


Comment by Erwin

I tried this but must admit to getting confused as to whether to use the quotation marks or not; and I couldn't past into the command prompt [DOS and I seem to have a mutual hatred for each other].
Having had Unlocker on my system for over a year, something Alec said reminded me that I could use that by right clicking on the obnoxious file [I'm used to it popping up to lend a hand and it never volunteered its services with this file].
So I did exactly what Alec did and it died [a hopefully painful]!!!
Thanks for the help
I don't think it matters how it worked, so long as it does.
Other people's comments are often just as useful as the original post .......
Thanks for starting this post, Duncan.
Did you ever think you'd still be helping people with the same issue 2 years later?.....
Amazing that you haven't just dropped it to go on without you.
I admire your perseverance..............
Cheers to all.

Comment by Jayesh


Two annoying files in C Drive - "½îG⌐╧ÄΣ." (Size : 133728K; 16-Sep-10), "g" (Size 200k, no datestamp)

Since I have moved these files to a new folder under root, I don't remember the original folder. Tried every solution on this page. But of no avail.

Please help me out, Magician Duncan.


Comment by Confluence: IT

File Server Rich Copy and ShareDup process...

  RichCopy references   How to delete files and fo...

Comment by snehal

thanks it works

Comment by Y's

Thanks a lot James. Before to visit here, i first attempt to delete with the del command but without success and still with the same message: Could not find this item [filename]: This is no longer located in.
Verify the item’s location and try again. I just apply the rd command and it worked !

Comment by richman



Comment by Chris

Hey Duncan,
You can rename these files through the Web-UI perfectly.
We are moving to Sharepoint as a complete document store, and it is only on the odd occasion taht we find this problem. Renaming or trying to delete a file through the explorer view (which we have mapped to a drive) has no effect, then trying to do it again gives the error descibed: cannot read from source file or disk.
It's so frustrating. We don't have workflow or any sort of approval or version history on this library.

Comment by Justin

Thank you very much Keith.... it work for me.... iwas annoying me for long time now :)

Comment by Doug

Thank you, thank you, thank you!

In backing up files manually, a folder was created in a large nest of folders; I could get rid of most of them except one way down in the directory.

Nothing removed it, except your solution.


Comment by Niklola

Greetings from Ohrid, Macedonia,

Comment by Sunny Bat

I probably searched around for an hour before finally finding this. Over thirty websites had zero results on my file "test ". This worked perfectly, and I was able to delete my entire directory of glitched files (Java-created. No idea how). Thank you!

Sunny Bat
Comment by saida frenteguedes

thanks a lot man i had these 3 files on my desktop for years that i couldn't delete or rename until i found this, you are my savior <3

saida frenteguedes
Comment by Rob's Help Desk

Thanks a bunch! My erroneous folder had a special character (appeared as a blank space, but wasn't) at the end, rather than a period. I could navigate to it under windows explorer, but could not delete it or move it. The 'rd' command worked perfectly. Thanks so much!

Comment by William M. Reed

This thread helped me figure out the problem. The solution CAN be easier, if you have a Mac still on the network to which you have access. Go to the Mac, and try deleting the file from there, as you would any other file.

Being a lowly Mac user myself, all that CMD stuff confuses me. Fortunately, I rarely need it...unless I'm using a PC. ;-)


William M. Reed
Comment by andrei radulescu-banu

Had a file ending in a dot that could not get removed. Using \\? did not work for me. Unlocker was able to remove it however.

andrei radulescu-banu
Comment by Neutralist

You, sir, are MY HERO. Thanks a ton!

Comment by Sandy Lee

I have TWO folders on my desktop that WILL NOT DELETE that says cannot locate source just like above. I have tried everything. I did what you said exactly and it keeps coming up on the command prompt window right after what I copied and past...more? Please help me get rid of these two folders which are empty at 0 bytes. Thank you!!!

Sandy Lee
Comment by Stanley

I've tried:
rename "\\?\c:\aaa." bbb
Result is "System cannot find file specified"

Comment by Ronny

I found and tried several things, then found your article from 6/12/08. Nearly 3 years old, but still solving the problem! Took me a while to realize that I had to put the " " around the whole path, but once I did that it worked. THANKS for the time and effort you took to help so many of us!

Comment by Stanley

I have one more question - I can't find out, how to rename folder with an ending dot? Deleting is OK, but what is the correct syntax for renaming?

Thank you.

Comment by Duncan Smart

You're missing the whole point of the article which is to prefix the whole file path with "\\?\" for example in your case:

rd "\\?\D:\Phone!!!!!!!!!\Frñdzzz."

might work.

Comment by Burt Clarke

You da man! I saw all kinds of remedies that didn't work, but yours worked 1st time. Thanks!

Burt Clarke
Comment by Esha

Thank you very much. I've searched forever for this problem starting in 2009 but never found an answer. The file name never showed up until today when I drilled down this 5 deep subdirectory structure the file name ended with a .; however, I can assure you that this file did not come from a MAC! I created it accidentally! How, I don't know.

Anyway, the del command did not work for me so instead I tried the RD /s but deleted the folders one by one, starting from the 5th deepest and ending up with the root! It worked!
Thank you so much

Esha Tamras

Comment by Czarah

I'm having the same problem. I'm deleting it from a device connected at my computer. it still can't be found. It's from my phone.

Comment by roel24

Hello Mr. smart guy! I appreciate your knowledge about this matter, I think you know what's the right command lines...
I've got a small problem in which you could help a lot; I have an annoying file types on my flash drive that were really hard to be easy to delete. File names like: ljuta, it appears to be a folder on my flash disk but i think its an executable file the corrupts my other files. other folders were named ¼+·+.ôÉ⌠...
HOW would i possibly delete the root of these nasty things on my flash disk?

Comment by Duncan Smart

Copy off the stuff you want to keep, then reformat your flash drive (right-click drive, choose Format...)

Comment by Jay

I have had this file for over 2 years on my desktop and been annoying me. The format wasn't working till I added in a Asterick in the beginning of file name. Worked like a charm:)

Comment by Halim

Thanks, this worked! The IT Guys wanted to delete my entire userprofile to get rid of this file.

Comment by Ven

Duncan Smart:
You are a freakin' genius.

Comment by Marcio

Thank you so much. It worked brilliantly.

Comment by tanja

my phone will not load the memory card. when I put the computer appear some files that are empty and can not delete them, pojvljuje this famous error Cannot delete file: Cannot read from the source file or disk, and other folders and files from memory cards your computer recognizes and opens normally. please help

Comment by Shayla~Needing HELP in Wisconsin

Have SEVERAL documents on a usb flash drive (back it up every month) and yesterday when I tried to perform my monthly back-up (copying files from flash drive to a network drive) I received the following error: Cannot copy file: Cannot read from the source file or disk.

I am able to copy the files over one-by-one, however this would take me more time than I have right now!

I have no idea how to find the file(s) on there that might be "bad" without going into every individual file which would be terribly time consuming! By accident, I did find a file named: SMRTNTKY, that has renamed all the folders in it with unrecognizable names.

Without going into more specifics that seems to be general description of my problem.

AND THIS is where my computer savvy ENDS! I have read and re-read these posts and I just simply don't understand enough to try the solutions suggested for fear I will lose my data and in the end finding out I did something wrong and could have saved my data after all!

So, if there's ANYONE reading this with a solution to my issue that can put it into "normal person computer terms" and assure me I won't lose my data as a result of trying.....PLEASE, please Help me!

Shayla~Needing HELP in Wisconsin

Shayla~Needing HELP in Wisconsin
Comment by AntonTh

Nothing worked (\\.\d:\etc\ /a /x whatever, rmdir -r, taking ownership - and the list goes on). Commandline simply did not see the file. Windows Explorer showed it but could not read it. Backup software stumbled upon it. Filename started with "._" and ended with "." (full stop).

In Unlocker 1.9.1 I simply clicked "Delete". The file was gone! How hard can things be... Thanks for sharing.

Comment by ReMO

I run check disk for my external hdd which was affted that all files delete what to do ?
MY external HDD FAT32 type, i lose my 7 years data what do to please help me for this issue
very urgent. Why like this happen if i run chkdsk for external ?

Comment by Pj

Thank you! I recently gave some files crazy names ending in dots and they were bugging me, just sat there on my desktop. I followed your advice and it worked like a dream. I used the right arrow key to just keep writing the same command line and then repeatedly hit the tab key - as you suggested - to go through my (previously tidied) desktop.

Thanks very much, this had been bugging me for a whole week and I haven't got much patience! Great idea to send that file to someone BTW. There's another file that you can't ever make.. and I forgot what it's called. Maybe it was DELETE.???, I bet you know. (Saw it once on a website and tested it, it's a window default thingy)...

Comment by nic

please help me the easiest way...i'm really having hard time finding the solution!!!!

Comment by Digian

Keith, brilliant. Tried some low level dos tools but the only thing that worked was your suggestion to use the old dos filename reference with del /ha as stated. Cheers

Comment by Scaggs

I found a really simple way to do this. I used a program called SyncBack Pro which is my favorite choice for backing up all my stuff to an external drive. SyncBack Free edition might do this too. Pro is 19 bucks. you can get it here www.2brightsparks.com/syncback/syncback-hub.html

i found a setting in the Advanced Copy/Delete menu a checkbox that says "Delete All the files and folders on "SOURCE LOCATION" before scanning for changes of files. This worked. it deleted all those .mac files that i couldn't with command lines.

basically, i created a new backup profile job for the folder that contained all my broken mac files that i couldn't remove or rename. then in the settings of the backup job, i clicked Expert Mode, clicked Copy/Delete, Clicked Advanced, then 3rd box from the bottom put a tick in the box "Delete All the files and folders first in the "Source Location" Why this options exists for a backup job i have no idea but thank God it did.

then i just ran the job. it deleted all the files causing me not to be able to remove the parent folder. For some strange reason, syncback pro did leave the parent folders and some files inside them. but when it was done, i was able to IN WINDOWS right click the parent folder and select Delete, which i could not do before. Now all the mac files and "crummy_file. . " are all gone.

Comment by missyb

Thank you so much for posting this! It worked and got rid of the annoying folder.

Comment by Ryan

Thanks so much for this - worked like a charm!!

Comment by Tony Pirat Gustafsson

Wow, that was really helpful. I had no idea!! :) Now I didn't have to reboot the server and run checkdisk which probably wouldn't fix it anyway.

Comment by Duncan Smart

Megan, sounds like the disk is corrupt or scratched. Not sure the tips here will help with that. Try reading the disk in another machine.

Comment by megan bester

Hi, I am getting the error message 'can not read from source file or disk', but its not a file im trying to delete. Its on a disk my husband and I purchased to make raffle tickets, the instructions with the disk say to copy it to the computer, only I cant because it keeps on bringing up this error message for what seems like every program on the disk. I am using windows vista. can anyone please help me on how to get it to work?

Comment by boopathy

Greats thank you for your help

Comment by Duncan Smart

"Two prior attempts to post ... Wonder why?" I assume WordPress.com's built in spam protection, although I have no record of anything being blocked.

Comment by megan bester

thanks anyway for your quick reply, we may have to get it replaced.

Comment by helpgeek

Awesome! Worked for me on WinXP with the simple "del filena*" trick. DOS has always allowed that, it's not something new in Windows 7.

Comment by Krishna

Thanks It Worked

Comment by Stanley

I've found this simple solution:
- display folder name by dir /X
- rename "AAA~1" "aaa"

Thank you for your support.

Comment by Pratik Rakhecha

D:\>rd Illüsîöñ...
The system cannot find the file specified.

D:\>cd "Phone!!!!!!!!!"

D:\Phone!!!!!!!!!>rd Frñdzzz.
The system cannot find the file specified.

D:\Phone!!!!!!!!!>del Frñdzzz.
Could Not Find D:\Phone!!!!!!!!!\Frñdzzz.

D:\Phone!!!!!!!!!>del Frñdzzz.
Could Not Find D:\Phone!!!!!!!!!\Frñdzzz.

Still having the problem

Pratik Rakhecha
Comment by David BYrnes

YOU ARE A GOD!!!!!!!!!!!!!!!!!
Thank you. This just happened, and was driving me crazy!

David BYrnes
Comment by Alex


Comment by Bohn

you safe my day !! Thanks a lot

Comment by Rennie

THANK YOU! It's been buggin' me for months!

Comment by Mantvydas

Thank you for an invaluable article! You saved my day!

Comment by Amit Gill

Yup tried as below : no results
That seems to a final option. Didn't wanted to opt for that cauz of the data and space issues.

F:\>RD /s "\\?\F:\JUNK4-13-10\Delete"
"\\?\F:\JUNK4-13-10\Delete", Are you sure (Y/N)? y
The system cannot find the path specified.

F:\>RD /s "\\?\F:\JUNK\4-13-10\Delete"
"\\?\F:\JUNK\4-13-10\Delete", Are you sure (Y/N)? y
The system cannot find the path specified.

F:\>RD /s "\\?\F:\JUNK4-13-10\Delete\Junk"
"\\?\F:\JUNK4-13-10\Delete\Junk", Are you sure (Y/N)? y
The system cannot find the path specified.


Amit Gill
Comment by Duncan Smart

Seems as though you might be getting the path slightly wrong. Use the TAB key completion tip mentioned above.

Comment by Amit Gill

No luck! :(
I tried all the simply using copy-paste.
I have it now as : "F:\JUNK" inside the JUNK folder I have 2 another folders named as Junk-1 and Junk-2 (all the wired files are sitting in these 2 folders).
I have used the commands as : RD/s "\\?\F:JUNK\Junk-1" (with and without spaces) No Luck
RMDIR /s "\\?\F:JUNK\Junk-1"

I tried both commands with and without coutes too, but no luck!
Any help is much appreciated. I too much frustrated with this space being blocked!
Thanks for all your help!

Amit Gill
Comment by Vassilis

Amit Gil Thank you soooooooooooooo much !!!!!!!!!!!!!!! Your suggestion worked !!!!!!!!!!!!!!!!!!!!!!!!!

Comment by Pacca

Thank you so much, Duncan! Two folders'd been blighting my desktop for the past two yrs. No longer! Thanks again.

Comment by weee

You the man!

Comment by Kristie

Oh my days, thank you so much Duncan!
Just re-formatting my USB worked instantly!

Comment by CompulsivePresetCollector

That worked!
What happened was a few months ago I downloaded a bunch of preset files for an onscreen guitar amp that is cross platform. User can upload presets and also download them of course.

I noticed two extra files with no file extension in my download folder. Two files with the same name, respectively but with proper file names where also there plus a few hundred proper files. I moved the proper files to their destination and tried to delete the two without file extension. No luck. My guess is that they are uploaded from some Mac user? It just burned my brain to see those MFs in there week after week in my download folder haha!

Anyway: the "del \\?\ ..." trick worked!!! :D
Thanx a lot!

Comment by jun

Problem solved!. Many Thanks!.. :)

Comment by Badal

Hey...Thanks so much...it help me a lot...thanks

Comment by 6553221

HUGE THANK-YOU for this tip!

Comment by its a computer network support thang!

Excellent article!

I'm glad it didn't take me years to figure this one out thanks to the info here. I was having trouble transferring files across the network from a Mac and it happened to be the '.' at the end. I simply renamed the file and bam!

I think the dot was added when I extracted a rar set.

Comment by mike

worked for me THANX!!!

Comment by Jaemz

Google a program called Delete FXP Files. This program can delete the file

Comment by hulkbuster

Very good reviews : man this helped solve delete a file with same problem which copied to anywhere in windows like desktop but would fail to delete: deleting from cmd prompt would not work.
del \\?\ c:\ _____ solved the problem.


Comment by ross

there is a software " unlocker" which did the job for me...!

Comment by sugar free

delet it temprary file go to run type there %temp% open page mark all and delete it pls all enjoy ur self thanks

sugar free
Comment by Hussain

Many thanks, this worked for me.

Comment by Derrin

Brilliant article - Thanks

Anybody had to recover from a filename with a new line character in it ?

Tried ^M cygwin , Mac Terminal through the volumes - nothing reads this file - it is a file created by Parallels - Icon\r

Thank you

Comment by Duncan Smart

You can download a free version that will show you if the data is recoverable.

Comment by AgihCam


Comment by Tony

I get the message "Unrecoverable error in folder ... would you like to convert folder to file?"
I am not sure what this means.

Comment by Amit Gill

If it is about the corrupted folder then YES go ahead and hit yes.. anyways what CHKDSK will do is to check the disk for errors and windows will try to fix those errors

Amit Gill
Comment by Long file paths... solutions?

[...] the limit. For example: del "\?C:myreallylongpaththerestofmyreallylongpath .txt" Bonus weirdness: a dot at the end of a file name will make it undeletable through explorer. Reply With [...]

Comment by Amit Gill

Did you tried running CHKDSK without /F from command prompt ? if no try doing that first and hit yes to what ever the command ask.
once you are done and see the disk result, the should fix the corrupted folders. Once you are done with that try doing the same thing again but this with /F functionality.
to do so you can follow below :

Step 1 :
1.Go to start
3.type : CMD
in the command prompt window type : CHKDSK and hit yes to everything

Step 2:

1.Go to start
3.type : CMD
in the command prompt window type : CHKDSK/F and hit yes to everything.

This will take several minutes (depending a the PC).

Once you are back see if the folders still exist or not. If yes then you can follow the command :

RD/s “\\?\Drive Letter:\Folder name″
RMDIR /s “\\?\Drive Letter:\Folder Name″

I wish this helps.
Good Luck!

Amit Gill
Comment by Tony

I don't understand any of this. Please help me. I am having a similar problem to what Amit described, but this all looks like gibberish to my dyslexic eyeballs.

Comment by bazkie_botsauto

thanks so much! have been looking for this for half a year :P

Comment by Scott_

Thank for the information above. It works!

Comment by Kevin

Yeah, this worked for me when I could not get the other to. Thanks a million.

Comment by Tzuriel

Brilliant! Thank you.

Comment by Mattew

i used this command :
rd /s "\\?\F:\work_new\work_pen\PROJECTSF:\work_new\work_pen\PROJECTS\\AUX. TR" to remove and delete AUX. TR folder
and it works correctly
thanks a million

Comment by abc

I succeeded to delete such a file this way:
1) Go to Command prompt
2) Go to the directory
3) Discover the DOS-name of the file; type "dir /x"
4) type "del dos_name_of_the_file"

Comment by Nac

Please Help! Iv'e tried deleting this file over and over using \\?\ in dozens of variations and I keep getting the message "The system cannot find the file specified"
I'm still not sure as to whether the quotation marks make a difference, if the filename has to be capitalized, if and where to add spaces and if there is a difference as to what folder I am "standing" in (i.e. should I be in c:\, or in C:\Documents and Settings\winx-p\Desktop?)

the exact filepath is C:\Documents and Settings\winx-p\Desktop\CAJQ4VBX.

this is a file, not a folder. There is a dot at the end of the filename and it is capitalized on purpose (that is how it shows up in the CMD...)
can someone write me the exact command I need to use to get rid of this file?

Comment by Duncan Smart

try: del "\\?\C:\Documents and Settings\winx-p\Desktop\CAJQ4VBX."

Comment by Sohel

rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder." works for me but after using space instead of .Many many thanks.

Comment by anon


Comment by ReMO

i had problem in my External HDD some of my files showing junk like ì>⌡ƪ.▄rî” i try to open error access denied and if i try to copy , Error: Cannot copy file. The Parameter Is Incorrect Error
how could i open my files because i had lot of JPEG pictures Please help me any one to solve this problem !!!!

Comment by Sksyae

thanks mf, its good

Comment by James

Awesome, cheers :)

Comment by harry

thanx working for me...

Comment by Remo

this is free or cost

Comment by s

the files are gone at last! thank you so much! the \\?\ did the trick!

Comment by Fred

you are so awesome dude

Comment by PhillyCHeeseSteakness


Comment by Raghavendra

how to open that folder

Comment by Ben Dover


Ben Dover
Comment by Asmaa

Thanks a lot!! This was of extremely gr8 help!

Comment by JM

I had the same problem, folders created by a Robocopy crash. Turned out the folder names ended with a space. The \\? method worked to delete these - thanks so much.

Comment by Gani

Helo, what if the problem was copying file from dvd-r to Harddisk?
I was trying to copy all files from dvd (Adobe Illustrator formatted) to my pc harddisk.
Some of the files were copied successfully but the rest weren't. I got the message "Cannot copy file. Cannot read from the source or disk"
I'm using Windows 7, the (ai. formatted) files appear on the windows explorer, but when I preview the files with Adobe Illustrator, half of the files appear in the preview thumbnail but the rest won't appear.
May anyone help?
Thanks & Regards..

Comment by Jacob N

Wow! Can't believe that worked! I've been messing with this issue for about an hour before I stumbled across the solution here. Well done.

Jacob N
Comment by Harry

THANK YOU SO MUCH! Six months with an annoying file, five minutes research, two minutes to type the thing correctly and its gone. I bet OSX does that on purpose!

Comment by gabriel

thanks a bunch keith that worked awesome.!

Comment by tony b

Also look for blank at the end of the files not just a dot. it also works perfectly thanks!!!.

tony b
Comment by DB

Thank you so much for the fix to this annoying problem. I was just clearing my Favorites before passing on an old netbook in the family and came to one with this issue. It looks like I'd saved the favorite with a name ending in "..." to be cute. Why would IE let me do that if it's an issue? lol

Anyway, your "rd' command option did the trick. Thanks heaps!

Comment by Duncan Smart

Hmmnn, looks fine, maybe there' a space at the end of "aaa. "? Or try using COPY or XCOPY to copy the contents out then RMDIR it.

Comment by A2

Chaooo...... The file itself separately wasnt deleted but the whole folder was successfully.

Comment by Mihail Varbanov

Well done - thanks a lot for this post!

Mihail Varbanov
Comment by JB

Yes it does work for a blank at the end--- good note. I would have dispaired without that comment...

Comment by nevet

As someone indicated earlier, the "del" DOS cmd didn't work on my XP Pro SP3 either, but Unlocker at http://www.filehippo.com/download_unlocker/ worked like champ. Thanks to all contributors who identified that simple, 5 minute solution!

P.S. To WebMaster: Two prior attempts to post the above using html per your format to hyperlink "Unlocker" didn't post. Wonder why?

Comment by chimichanga


Comment by Debra Carver

I just want to Thank You for this awesome answer to the question I had with getting the cannot delete file and cannot read from source. I was able to get rid of the pesky fie. Thanks for everything. Debra

Debra Carver
Comment by Phil

Thank you, Thank you. I copied and pasted the file name in to make sure it was excatly right and it worked.

Comment by William Johnson

Had such a directory - this worked! Thanks! : - )

William Johnson
Comment by DZDNCNFZD

Wow I've been trying to delete a 0 byte "system file" with a space attached to the end for forever and this finally did the trick. Thank you!

Comment by jim

OMG thanks, i just got rid of a dir like that. It seems you need to use the full path also for this to work.

^ Armit you are missing the "\" right after the drive letter. try “\\?\F:\JUNK\Junk-1"

Comment by Amit Gill

Thanks Jim! but the problem was solved after I was able to run CHKDSK on my disk, once the PC came up the folder was not there. don't ask my how. but i appreciate all the support!
Best Regards

Amit Gill
Comment by jose|samson

I use UNLOCKER and it was way easier and faster.
Two clicks, and your pesky files were gone. :)

Comment by syrono

Thanks ALOT!!!

Comment by Endre

Wonderful! Thanks, it solver a big problem for me.

Comment by Debbie

The only solution on the internet that worked.. I had Symantec support on the phone for 3 hours (it was in their program path) with no success. I did a google search and you were first!! kudos.

Comment by Mr Walker

My friend, you are a genius! This trick does also work when using other commands like REN to rename problematic files which have a blank space as extension.

Thanks Sir!

Mr Walker
Comment by Amit Gill

HI Duncan,
I'm facing the same problem on my WD external drive. I have a backup folder which is showing the files with wired names ex: ∙╚Üæ⌐█. σÿ . I have moved them to a folder called JUNK but I cannot get rid of these files as the error : "Cannot Delete file : Cannot read from the source file or disk" come up while deleting these files or even the folder called Junk. I have tried all the up-listed commands but no results, it keep throwing the error :
" ∙F:\JUNK4-13-10\Delete\Junk\Junk-1\#<εδƒZ§Ö.R^Φ - The filename, directory name,
or volume label syntax is incorrect. " where F: is my external drive.
Can you please help on getting rid of this folder. Right now it's consuming 158GB space.

Thanks in advance.

P.S: My e-mail is andy81p@hotmail.com

Amit Gill
Comment by Duncan Smart

Have you tried:

RD /s "\\?\F:\JUNK4-13-10\Delete"

Alternatively, back up your external drive and reformat it.

Comment by Josamae

oMG.. the best ever... i love it.. It worked for me... Almost 5 months since I''ve tried to delete this annoying file... Now, I've found the solution..Thanks a lot.. More power to u...

Comment by dama yarcia

Thank you so much for this... very helpful!=)

Comment by Joe

You rock! 'Nuff said.

Comment by edrees

I just want to know, how to rename a folder which ends with dot "." , thanks

Comment by Duncan Smart

Do a "DIR /X" to get the short name and use the short name (has a ~1 or ~2, etc on the end) in the REN command, e.g.:

C:\Temp>DIR /X test*

01/03/2012 09:20 AM TEST~1 test. 0 File(s) 0 bytes 1 Dir(s) 24,212,267,008 bytes free

C:\Temp>REN TEST~1 test

Comment by Jameson Romero

GOOD LOOK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

Comment by EMM

Thank you!!! That file has been screwing up my backup protocol for ages. And it was exactly as you said, an old Mac file with a period at the end. Hooray!

Comment by Atul Khemka

Thanks I was able to delte the file with the help of this article
Atul Khemka
Nagpur, Maharashtra, India

Atul Khemka
Comment by Myles.

This worked perfectly; had this happen on my work computer, and I was so doubtful that I wouldn't be able to boot a linux live cd that I was fearing I would have to call the Evil IT.

But this method worked perfectly. Thanks!!

Comment by bam

At first this didn't work because the folder I was trying to delete was one I created in the Documents and Settings folder, but it wasn't a user folder (long story). So when I typed the "rd /s "\\?\C:\Documents and Settings\Annoying Folder" -patterned command it said it couldn't find what I wrote.

Whereas I couldn't move the annoying folder before, I discovered that I could move the containing folder up one level, and since none of it was inside the Documents and Settings folder and expected to be treated like a user folder anymore, I could just type "rd /s "\\?\C:\Annoying Folder" and it was gone!

I tried researching this on other sites, but their solutions seemed too complicated (since I'm not too techy). But this was pretty easy. THANK YOU, THANK YOU, THANK YOU!

Comment by Eriyu Snow

Thank you so much! Not only did this work, but it's both informative and concise. ^_^

Eriyu Snow
Comment by Anon

It Worked! I had corrupt files that have been sitting there for about a year. I tried a few programs that didn't work but a simple command prompt did. Thank you so much!

Comment by Dee

Yessssssssss....this worked and it was easy. Thank You!!!!!

Comment by Valappil

Thanks a lot, it works

Comment by Grump3

Copy & paste wouldn't get rid of mine but your tip to use the tab key to scroll to the offending file worked.

Comment by RIzwan

my problem was relevant to copying .DAT from disc to local drive, that was indeed not strived to be solved here. I would like to purvey my observational solution to this problem, you can just add it up in winzip archive and that will do eventuate it compressed form by then you can move it around your local hard drive.

Best regards,

Comment by just

Sorry Duncan, I have no opportunity to buy you a drink. however I kiss you three times for this post.

Comment by RD

Great !!!!

Comment by Flori

Hello Duncan,

I'm an old lady trying to cope with this old Compaq computer.
Just came across your blog - but whatever I try, no success.

This one generic file on my desktop, called
constantly brings up this dialog:
"Cannot rename file: Cannot read from the sourcefile or disk"

I know a few things about the computer, but I can not get rid of this file...
not even trying to apply your knowledge from the blog.

When I bring up the command prompt, what do I need to type into it?

I hope that I have the right email address for you and that you can guide me to delete this one file.
Thank you so very much for reading my "HELP" plea.

Comment by HSHAS

ive tried any ways, but theres no worked.
may be just copy our files to anothers disc, then format the disc who dot the problems.

Comment by JJ

Thanks, this resolved my issue...

Comment by Brad

I had the same issue and could not delete the file, so instead i removed all other files from that folder, then deleted the folder using: rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder." (which I found in this article).

Comment by Pratima

thanks a lot del "\\?\C:\Temp\Stuff\Sales Agreement." solved my problem :)

Comment by OKU2

Finely!!! Got to work after several attempts, but was persistant and kept re-entering the path until I had correct. File gone from desktop!! Hah! Thank you so much for all the comments and help. It paid off!

Comment by mcraghead

Another tip: since the weirdness often lies in obscure filename issues, it can help to use a wildcard so you don't have to get the offending file name just right. In my case, pasting the "actual" file name didn't work, but pasting the first few letters with an asterisk did.

So: instead of "Annoying file you can't delete," try "Annoyin*" and you'll get results.

Of course, make sure the name is unique! Do a "dir" and make sure you don't have a file called "Annoying file I can't live without and should absolutely never delete," because the asterisk method will delete that, too!

Comment by Mason

4 years on and this still works. Thanks!

Comment by OutStanding

While I was working in a program I renamed a folder with “&….”, after that whole content disappeared. Tried with Unlocker to resolve the pbm. , restart the PC, but… it displays me that “Cannot rename &…. The filename, directory name, or volume label syntax is incorrect” and ask me to rename it on the next reboot. I had there the selection of 48 hours of fonts; 40 from a little more than 300 from over 150.000 fonts viewed this time. I can’t just watch them again. Windows shows that the folder is empty and I do have some bad sectors on that partition.
When I access the folder it shows me this error : "C:\Name of main folder\X &.... refers to a location that is unavailable. (....)"
When I try to rename that folder it gives me this : "Cannot rename file: Cannot read from the source file or disk".
I boot with Windows Live Cd but.... same errors.
I think its placed on a bad sector but, on a chkdsk c: /f and returned that I have 0 kb in bad sectors.
The folder is empty. How can I retrieve those fonts from an empty folder ?

Comment by Mike Lim

I know this comment is years old, but thank you so much! I was able to delete a file from my external hard drive using Unlocker that I couldn't delete using the method in this article. Thanks again!

Mike Lim
Comment by Sarah


Comment by gian

help plzzz i got this Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Pc>del "\\?\C:\Temp\Stuff\Minecraft
The system cannot find the path specified.

C:\Documents and Settings\Pc>\
'\' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\Pc>del D:\Minecraft
D:\Minecraft\*, Are you sure (Y/N)?
D:\Minecraft\*, Are you sure (Y/N)? y
The system cannot find the file specified.
The system cannot find the file specified.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.

C:\Documents and Settings\Pc>del "\\?\%USERPROFILE%\Desktop\D:\Minecraft
The filename, directory name, or volume label syntax is incorrect.

C:\Documents and Settings\Pc>del D:\Minecraft
D:\Minecraft\*, Are you sure (Y/N)? y
The system cannot find the file specified.
The system cannot find the file specified.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.

C:\Documents and Settings\Pc>

Comment by Mark

THANK YOU ! it's work!

Comment by yojaz

oh yes thank......

Comment by Mike

Mine was "c:\path\Long File Name.DOC " . Note the space after the "c" at the end of the file extension. Windows XP didn't like having that trailing space.

Comment by N8

I LUBZ YOU!!!!! I was create a .bat file that renamed the files with %time% setup in a specific orde. Unfortunately I specified the wrong decimal place and rename a few files (20130128_.5.). I could not delete them and was suprised windows allowed the bad filename.... oops. But you saved me!!! I have learned my lesson!

Comment by James

Thank You Very Much...It worked...and helped me...

Comment by Fidskwizard

Excelllent. Linux commands for the win! I had tried a bunch of things, and nothing worked.
I was doing it remotely like this, on a folder.... RMDIR '\\Server\share\folder\BADfolder1 '
Note the space at the end... that seemed to be part of the issue.

Comment by Adam

Brilliant !

Comment by Jeffrey

Thank you so much, very appreciated for posting this solution! Happy new year!

Comment by Delli

Thanks a lot.........

Comment by Adil Bilawal

thank you so much. worked for me

Adil Bilawal
Comment by Durai

Thanks a lot..

Comment by Enrico

Very nice, thank you very very much!

Comment by MaslowK

Old as this is I feel inclined to comment with thanks. As it turns out, different flavors of Linux also seem to do this, which for the longest time left me baffled as to why I could execute/delete/move particular files on my NTFS storage partition from Linux and not from Windows. Weird stuff.

Comment by james

my desktop one folder name "son of raja" how can i delete this folder pls reply anybody

Comment by wiki

"The System cannot find the file specified"

i followed the instruction above but this is the result, i checked the file name / folder name and it was correct but still that's the reply i get

Comment by EJ

Glad this solution was still around... worked for me!

Comment by pred

thank you, awesome solution

Comment by vivek

it worked! Thanx