Cannot delete file or folder

Tue, 2007-07-17 11:46 by admin · Forum/category:

After trying the following methods, please click here to let us all know your results.

Table of contents

for this article

Reboot

Reboot, then delete.

DEL or RMDIR

Open a command line window (WindowsKey + R, enter: cmd). Move to the folder in question by means of CD commands like CD \ and CD foldername.

Delete the file or folder by using the DEL command to delete files or the RMDIR (remove directory) command to remove directories (folders).

Kill explorer.exe

If this, on its own, is still not enough, then leave the command line window on the desktop, open Task Manager (Ctrl + Shift + Esc), and kill all explorer.exe tasks. Your desktop will go blank, except for the windows already open.

Now try to delete the offending file by means of the DEL command, or folder by means of the RMDIR (remove directory) command, in the command line window, as described above.

After that, in the command line window enter:

explorer

to restart your desktop. If you closed the command line window, you can still restart explorer by opening the Task Manager by holding down the Ctrl and Shift keys and briefly pressing the Esc key. In Task Manager select Applications, New Task and enter: explorer

Log off

If the previous method fails, particularly with multimedia files, log off, then log on again, but do not select the file in Windows Explorer. The safest way is not to open Windows Explorer in the first place.

Then try the previous method again.

Reboot again

An even stronger measure would be to reboot, then try the previous methods again. This would work, for example, if a service has the file open.

Delete containing folder

[Thanks to John Barrington:] If you can't delete a problem file, try deleting the folder that contains the problem file. If this doesn't work, try this next item.

If the problem file and its folder, we'll call (A), is within another folder, we'll call (B), try to delete the folder (B) along with any troublesome contents.

Of course, you want to make sure, if you have any other important files or folders within either folder, that they are saved in another location first.

Use RMDIR on containing folder

Begin like the previous method, but try also

rmdir /s foldername

(replace foldernamewith the name of the folder to be deleted). This command should delete a folder with all its subfolders.

If the folder name contains one or more spaces, enclose it in quotes. Example:

rmdir /s "folder name"

Note that the abbreviated command rd can be used in place of rmdir.

Use short name

If the folder name contains strange characters, use a command line window again, but use the DIR /X command to find the short name (for example: PROGRA~1) and use the short name instead. The short name is DOS compatible and has no more than 8 characters for the main name, a period, then no more than 3 characters for the extension.

Retry the previous methods that use a command line window, but use the short name now.

Note: Sometimes an illegal file name can cause Windows Explorer to use nearly 100% of the CPU time.

[Thanks to astk1:] Sometimes the abbreviated name can have a number other than one and can have an extension. If the above does not work, proceed as follows.

  1. Open a command line window (Start, Run, type: cmd, press the return/enter key).
  2. Navigate to the folder using "cd .." and "cd pathname", where pathname is the name of the next subfolder you want to go into.
  3. Type dir /x to see the actual real short name of the subdirectory. Critically: This may include an extension, e.g. "ABDCEF~1.XYZ".
  4. Type "rmdir /s abcdef~1.xyz", replacing the example name abcdef~1.xyz with your actual folder name.

Safe mode

Boot into safe mode and try to delete the file or folder there.

Stop program

If you're trying to delete a program file, like one with the extension .exe, the cause could be that the program is currently running. Stop it, then delete the file.

If the program starts automatically, check the article Autorun causes on how to remove the start command. Do it, reboot, then delete the file.

Rename or move during next boot

If this also doesn't work, there is a way to rename or move a file or folder during the boot process. For this you need to use the registry editor REGEDIT.EXE. See the Registry warning for a general warning.

Create an entry in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Session Manager\

named PendingFileRenameOperations of type REG_MULTI_SZ. In pre-XP Windows versions you have to use REGEDT32.EXE to create this value type.

The first line of each pair is the current file or folder path and name with \??\ in front of it.

The second line of each pair is the new file or folder path and name with !\??\ in front of it.

Example for one pair which moves the file mfc42.dll from the temp folder to the system32 folder and overwrites any existing file at the destination:

\??\C:\TEMP\mfc42.dll
!\??\C:\WINDOWS\system32\mfc42.dll

You can add as many pairs as you like. The move operation is performed directly after the next reboot. You can also give folder paths, so the folder will be renamed. But both paths have to be local.

There is a Windows API call for this, named MoveFileEx, and somebody in Germany has even written a utility named MoveEx for it. You can download it from http://wwwthep.physik.uni-mainz.de/~frink/nt.html. Use it if you need this function often. A Posix utility from a Windows Resource Kit named mv.exe also does it, just in case you still have the resource kit around.

Use another operating system

Boot into another operating system to delete the file from there. The other operating system can be, for example, another installation of Windows, BartPE, Knoppix, Ubuntu, or any operating system that can read the file system used (NTFS or FAT32).

Connect hard disk to other computer

Remove the hard disk from the computer and connect it to another computer. Delete the files or folders there.

Use unlock utility

If you cannot delete a file or folder because it is in use, you can use one of the mostly free utilities, such as Unlocker.

Shorten names

If the cause is that the path and file name is too long, first try to rename folders in the path with shorter names.

If that doesn't work, you can use the following method, reported 2007-05-17 by Mark Briody:

Open a command line window and use the subst command to create a virtual drive to the folder containing the long file name, e.g. (all in one line):

subst x: "C:\Documents and Settings\briodym\Favorites\Mark\Gadgets and Hardware\Hardware\Stores\eBuyer"

Then change to the virtual drive x:, and you should be able to delete, rename, and move files and folders.

Finally, to clean up, remove the subst again with:

subst x: /d

Deal with hidden or system files

[Thanks to warpcoil, who first described this method in a comment below]

This method deals with files that carry the hidden or system attribute. You can delete such files in Windows Explorer, if you set the folder options such that these files are shown in the first place, but the following method can delete them from a command line window.

Open a command line window and navigate to the offending folder by means of the cd command.

Show all files, using the attrib command. Note the attributes displayed as single letters on the left side of the listing:

Letter  Attribute
R Read-only
H Hidden
S System

Delete the offending files with the commands:

del /f /a:s

del /f /a:h

Replace with the name of the offending file or files. You can use wildcard characters. For example, the following command:

del abc*.* /f /a:h

would delete all files whose names begin with abc and which carry the hidden attribute, regardless of the system or read-only attributes.

When it works you get no response, but typing attrib again will show that the file has gone.

Results

After trying the above methods, please click here to let us all know your results.

Average: 3.6 (192 votes)

Cannot Delete folder/video

Wed, 2009-08-05 01:44 by acepilot1212

I have tried multiple ways to delete a video i have, but it always says i need to confirm the operation, so i do, then it says destination folder access denied. I tried taking ownership of the file, but it says unable to set new owned, access is denied. i tried using the command prompt also to delete it, but it's on my desktop and the command prompt can't seem to find my desktop. I can't move or even rename the file. Any suggestions?

Video file - several methods will work

Wed, 2009-08-05 06:42 by admin

I believe that the cause for this behavior is that Windows Explorer actually enrolls a codec to determine the file type or some such. (If anybody knows more about this, please reply.)

Now if anything goes wrong there, like a defective codec (and there are many) or a not perfectly encoded media file, the codec can crash and fail to release the file after opening it.

Several of the above methods should work. Try to avoid opening the folder, try to prevent that Windows looks at the file. For example, reboot, then delete the entire folder. You may have to move other files out first, but then you have to reboot to release the problem file.

But the most convenient method is still a tool like Unlocker, which essentially does all this behind the scenes and without you having to worry about anything.

If all else fails

Wed, 2009-07-29 03:59 by the_kut

How I got this forum is interesting: while trying to convert my C: drive from FAT32 to NTFS under Windows XP, I kept getting the error on one directory that there was not enough disk space for conversion (I had 100 GB free). On further analysis, I figured out that it was the usual Windows philosophy of providing a random error when they did not know what the problem was and that the real issue was that the directory had invalid entries (including multiple files with the same name).

I decided that I should try and delete this directory, but none of the following worked:
1. chkdsk /f (showed no bad sectors)
2. Regular Windows delete
3. Robocopy
4. The Path Too Long Utility
5. Boot with another operating system.

After a week of frustration, I realized that I could use my Acronis True Image software to take a image copy of the entire drive excluding the offensive directory and then restore the drive from this copy. It worked!

This requires buying Acronis and having an additional disk, but if you do not already have a utility like this for backups, then it is time to get one. Not only can you recover from a damaged drive, but you can also roll back changes, find files that you may have accidentally deleted or over-written.

Hope this helps.

BTW, the reason I was trying to convert the drive is because that is the only way to upgrade to Vista (and Windows 7) without having to wipe the disk, lose all settings and do a clean install. I love XP, but I am going to have to upgrade some time in my life.

Good info

Wed, 2009-07-29 08:33 by admin

Thanks a lot for this information.

Too bad that good old chkdsk is too stupid to catch this kind of error. Too bad also that we don't have some unlink utility that just removes the folder, no matter what. But that's how it is.

delete if that file or folder is restored from Image (Acronis)

Wed, 2009-07-01 15:21 by cnksoft

What if a file or file is restored from image after deleting a particular user account.
How to delete that file if a user account is deleted. ie., that file is copied from c:\documents settings folder to somewhere in D drive.

Embedded colon in file name

Sat, 2009-05-09 23:37 by escherplex

Amazing ...

On a WinXP/SP3/NTFS set up to dual boot with Ubuntu Debian Linux I had a problem with a .pdf which had a ':' embedded into the file name. None of the downloaded utilities worked nor did any of the command line scripts. But for the Gnome-GUI File manager, deleting the offending file was a non-event. What's amazing is that resorting to the use of another (free) OS was the simplest solution to correcting a rather difficult Windows problem. Just hope Win7 when it finally shows up isn't as buggy.

Yes,

Sun, 2009-05-10 05:42 by admin

another operating system sometimes comes handy. I also carry some kind of Linux boot disk, if only to use the Gnome Partition Manager.

Microsoft may not directly be faulted. They would probably say that it is impossible to create a file with a colon in its name with Windows itself, so it's not their problem. The underlying problem is that Windows does not defend itself against other faulty software.

Quick side note for dual-booters

Sun, 2009-05-10 12:38 by escherplex

Caveat: if you have or are considering a dual-boot environment be careful with Linux network security settings since the Gnome file manager is potentially a hackers dream. I have some OpenOffice .odt-s archived on WinXP in password protected WinZip files, the contents of which are readily accessible in Linux without knowing the password. This suggests that not only MS but other commercial utilities within Windows fail to insulate themselves from external interference.

Can't be

Sun, 2009-05-10 20:25 by admin

That doesn't fit my knowledge. ZIP files are encrypted and cannot be cracked, if the password is long enough.

I would recheck that carefully.

XP solution

Tue, 2009-02-03 17:49 by blahburto

Bring your DOS window up (Command Prompt - XP) and find the folder that the image is in.
If it's the only image in the folder, this is the best way to do it.
Use the command 'erase *.jpg' (if it's a JPG), which basically erases all JPG files in the folder that you're currently in
You can also use 'erase *.*' and than answer 'Yes' - it will delete all files in the folder

Has worked for every file I've had like that.
Hope this helps.

Java will allow you to delete the path.

Sun, 2009-01-25 19:53 by Jens Moller

If you know how to use Java....

I did this under Windows XP

Install a recent Java JDK (http://java.sun,com) . I used 1.6.0_11 (change this as needed)

I put my work files in C:/JavaStuff/DeleteTree, so all the instructions here assume you will do the same.

Create a Blackscreen batch file - DeleteTree.bat
----
@echo off
echo Using jdk Java 1.6 with xp

SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin;c:\JavaStuff;c:\JavaStuff;
SET CLASSPATH=%CLASSPATH%;.;c:\JavaStuff;c:\JavaStuff\DeleteTree;
SET CLASSPATH=%CLASSPATH%;c:\JavaStuff\DeleteTree\commons-io-1.4.jar;

c:
cd c:\JavaStuff\DeleteTree
c:\windows\system32\cmd.exe
----
NOTE: On some Windows platforms the last line will be
'c:\winnt\system32\cmd.exe'

Download and unzip Jakarta IO from http://commons.apache.org/io/ - I used V1.4

Copy the commons-io-1.4.jar file to c:\JavaStuff\DeleteTree\

---

The subdirectory I wanted to delete and everything in it was 'E:\xlook\ads-old'

It was created by an error in an Eclipse file I was trying (probably 100,000 or so subdirectories were created).

Change the Following Java file to use the file path you need to remove:
---

// DeleteTree.java

import java.io.*;
import java.util.*;
import org.apache.commons.io.FileUtils;

class DeleteTree{
public static void main(String args[]) {
try {
File rm = new File("E:/xlook/ads-old");
FileUtils.deleteDirectory(rm);
} catch (Exception e) {
e.printStackTrace();
}
}
}

----

Double click on the DeleteTree.bat file - this will give you a Blackscreen. if your Java is setup right, you will have access to a Java Compiler and the Java Run time.

Enter the following commands to compile and run the application:

C:\JavaStuff\DeleteTree>javac DeleteTree.java

C:\JavaStuff\DeleteTree>java DeleteTree

----

In my case, it took quite a while for the program to finish (6 minutes or so), it was a very deep tree.

You can use notepad for the editor. If you use the same setup I used, It should only take 15 minutes or so.

I did not allow you to pass in a path - I considered this a dangerous thing to do - that is why I force you to hard code the exact path name in.

This is all free.

Thanks for the tool

Mon, 2009-01-26 07:41 by admin

How about polishing this tool, so it becomes very easy (one step) to use, and uploading it here?

A little problem is that Java is required, which is a bit heavy for those users who do not already have it installed, but for those like me who have the Java Runtime Engine installed anyway, it would be easy to use.

I used one tool at

Mon, 2009-01-19 10:49 by Perer Faulk

I used one tool at http://www.abtollc.com/Folder-Delete.aspx which has ability not only to delete files but also to copy it.

Thanks

Mon, 2009-01-19 17:17 by admin

Thanks for the link. However, that tool helps only in the one case where the path is too long. And it even costs money. And that problem can be solved quite easily by renaming a folder. Still, if somebody keeps having this particular problem, it could be useful.

Cannot delete folders, access denied

Sun, 2009-01-04 16:42 by MisterEd

I can't delete three folders.

Among the other folders the F:\ Partition has a folder with two subfolders:

4fbbc9a731b8358b44f945be7229ef02
-> amd64
-> i386

There owners are: "S-1-5-21-1606980848-1935655697-839522115-1003"

The properties of "4fbbc9a731b8358b44f945be7229ef02" show:
0 files, 2 folders, 0 bytes

With Windows Explorer I set:
[X] Show hidden files and folders
[ ] Hide protected operating system files

There appears to be nothing hidden
Also, if I try to acccess either "amd64" or "i386" I get "Access is denied"

I have tried to delete these folders using most of the mentioned methods with no luck
These include:
* rmdir and rmdir /s
* logging off and on
* rebooting
* Unlocker delete
* Unlocker delete on next boot
* Safe mode with command prompt
* Shortening the name of "4fbbc9a731b8358b44f945be7229ef02" to "4fbbc9"
* Changing the ownership of all three folders to my account (I am an administrator)

Access rights

Sun, 2009-01-04 22:56 by admin

Two things need to be done:

  1. Take ownership. You have already done that.
  2. Give yourself (or 'Administrators', if you are in that group) all access rights.

You need to do that for any content of the folders as well.

The folders have probably been moved from another computer, hence the strange owner, whose common name is not known on this computer. It would be easier, had they been copied, rather than moved, but it's still possible to give yourself access rights.

By the way, this same problem also occurs when you want to delete the System Volume Information folder (after disabling System Restore for the drive).

Did this work in your case?

When you said "Take

Thu, 2009-01-15 07:46 by MisterEd

When you said "Take ownership. You have already done that." that got me thinking. I had taken ownership of the top level folder only.

I went back and looked at the Change Owner in the security settings. There I verified that I was the owner of the top level directory. I then noticed something I missed before. At the bottom was a checkbox for "Replace owner on subcontainers and objects". After I checked that and clicked OK I went back to look at the folder again. Where before I was unable to even browse the subfolders I can now browse them. I am now finally able to delete these folders.

Thanks for your help.

Great

Thu, 2009-01-15 08:18 by admin

I did, vaguely, mention that the contents needs to be done ("You need to do that for any content of the folders as well."), but unfortunately I did not explicitly mention the little checkbox, although I use it all the time.

I had the same problem, I

Thu, 2008-08-28 08:37 by Jane Fox

I had the same problem, I studied the way of using all these commands for some time and then I bought File / Folder Clean-Up Tool(Long Path) at the address http://www.abtollc.com/products.aspx and cleaned everything i wanted to.

i3WM078's picture

None worked for me, however...

Tue, 2008-07-29 17:58 by i3WM078

I tried everything on the list to no avail. Still getting the same message:

"The process cannot access the file because it is being used by another process."

Anyway, to cut a long story short...

In a CMD window, I ran CHKDSK with /F /X switches.

CHKDSK forced my drive to dismount.

RD /S & the short name of my problem folder and my 3 problem .MP3 files are FINALLY gone.

Interesting!

Tue, 2008-07-29 21:13 by admin

It seems that you have found yet another reason why a file or folder cannot be deleted—a mangled file system.

Has anybody else seen this before? Please reply.

warpcoil's picture

Alternate method

Mon, 2008-06-16 20:48 by warpcoil

I had files on two systems that would not delete and caused backups and AV sweeps to fail; one was on the desktop and the other in the hidden directory folder structure c:\documents and settings\user\local settings\temporary internet files\... used for the IE cache.

This method worked for both, after all the above failed.

Open a CMD window and navigate to the folder, using "attrib *.*" to find the names of the hidden folders and files.
Once in the right folder type "del xxx*.* /f /ash" where xxx is the first characters of the file name sufficient to be unique compared with anything in the same folder you want to keep.

If/when it works you get no response but typing "attrib *.*" will show that the file has gone.

Good method!

Tue, 2008-06-17 06:17 by admin

Thanks for this method! The previous ones didn't contain any that deals with hidden or system files. I have appended this as a new method to the main article above. A few notes:

Instead of attrib *.* you can just use attrib alone.

You have to use both commands, one with /a:s and the other with /a:h, otherwise you will not delete files that have only one of the two attributes.

Methods 11 to 14 should also work on hidden and system files, but yours is simpler and faster.

Ubuntu to the rescue

Thu, 2008-05-22 00:39 by Packrat1947

Taking ownership can be done, but it's a complicated process. You could always download and burn a Ubuntu 7.10 bootable disc. You can even buy one for a dollar.

You'll boot into a Windows like enviroment. Go to Places (at the top of the screen), then open up your recalcitrant folder. Now you can delete, move, or do whatever you please with no permissions, or ownership issues.

One time in malware cleaning a customer's machine I had an undeleteable .dll file. This was the ONLY way to remove it. I tried Killbox, MoveOnBoot, and several other methods.

Packrat1947

Unbuntu

Tue, 2008-07-29 16:07 by jputter

I tried with success the Unbuntu 8.04 download. There is a down-loadable 695 MB operating system.It enabled the deletion of folders, which previously could not be removed in the Windows operating system, WinXPPro. These files were not only inaccessible, but prevented a Power Vault RD1000 backup system from working properly. Roxio installed Unbuntu on a CDRW. Then run the Unbuntu program, which offers the option of using the operating system as a demo directly from the CD without an installation or change to the computer settings. Once booted up into the Unbuntu operating system, go to "Places" in the top menu bar and delete any file or folder at will.Other methods to delete inaccessible files such as going into safe mode, truncating the size of folder names in the file pathway, or using remove directory commands in DOS, were not workable solutions.

Good solution

Thu, 2008-05-22 18:55 by admin

Thanks for this solution, which is essentially method 12 above, using a bootable Ubuntu CD. (Ubuntu is a popular Linux distribution.)

Excellent guide

Thu, 2008-05-01 04:11 by Tim 13

I just wanted to take the time out to thank everybody responsible for the creation of this guy. Via torrent sites, I downloaded an album tonight with a cross in the folder name: †

For whatever reason, explorer would shut down whenever I tried to delete these folders or change their names. At a loss for ideas, I showed up to this site, and tried a few of these suggestions. Using the command prompt, I managed to delete the folders that I had emptied out already, but there were even MORE problems after this. At least one of these album folders had folders inside of them which were TOTALLY invisible. Even the command prompt wouldn't find them. So, I used the "delete folder and subfolders," or rd /s, and that ensured that the problem folder was completely empty. From there, I managed to rd the folder itself from my desktop.

It was a war that I could have gone without fighting, but at least now, I'm richer for the experience, and I know how to handle it if I have any similar problems in the future. BAM!

Glad it helped

Thu, 2008-05-01 10:16 by admin

Isn't it strange that the operating system refuses to obey its master's command? Refusing to delete seems to be a particularly nasty transgression, in my personal view. But this web page should transfer the command back to the user. (:-)

"PLEASE FOR THE LOVE OF GOD

Wed, 2008-04-16 17:15 by Pangaea

"PLEASE FOR THE LOVE OF GOD SOMEONE HELP ME, PLEASE PLEASE PLEASE..
IM PREPARED TO PAY FOR THE HELP AT THIS STAGE.. PLEASE PLEASE PLEASE SOMEONE TAKE ME OUT OF THIS NIGHTMARISH HELL THATS BEING GOING ON FOR OVER 2 MONTHS NOW!!!!!! H E L P

2 months ago, i put a new hd into my pc... i slaved the old drive so the old drive is now D: ... by the way im running xp pro sp2.
I reinstalled windows onto the new drive C:
But the old drive D: still has the windows installed onto it.
There are 3 folders on the old drive i want to delete and send to the bottomless pits of hell..

Windows
Program Files
Documents and Settings

Windows REFUSES to delete these folders.. access denied ..etc

I AM logged into an admin account, so i should be able to delete these stupid folders.

I used third party things, like File Unlocker.. with no luck at all

I emailed mircosoft about 10 times regarding this,, either getting no replies, or useless replys... I physically wrote 2 letters to microsoft.. no reply... ive looked at 100`s upon 100`s of forums online, trying 100`s of different methods of deleting these folders... NO LUCK

this is now into the 2nd month of this nightmare. i cant work out how to do this, im angry, in particular with mircosoft, im fed up, and i dont know what to do short of formatting the drive (witch for other reasons is out of the question)

the last thing i tried was this (as directed by someone at mircosoft)
http://support.microsoft.com/kb/308421

sounds simple enough, tho.. if u read it carefully ull soon find out that the information there is not right....
meaning: they state on steps 2 and 3
2: 2. Click the Security tab, and then click OK on the Security message (if one appears).

3: 3. Click Advanced, and then click the Owner tab.

so first of all, step 2, "click OK on the Security message (if one appears)."
i have never never never seen a "security message" doing this in all my countless years using windows
secondly, stop 3, "Click Advanced, and then click the Owner tab." ...
..what the hell are you talking about mircosoft?? click on "advanced".. where the hell are you seeing these options? Owners tab?? are you on the same planet mircosoft?... Are you using some future version of windows as an example here???

PLEASE.. i need some help with this asap.. as im about to litterlaly chuck this pc out the dam window.

POST UPDATE ...... i gave my pc to a guy and payed him 80euro to try delete the folders..... he had no luck at all. tho he did manage to change the ownership of the offending folders to whatever account he was using... he said that after he did that (in safe mode)... he coulnt delete the folder what so ever.... same old story, access denied this, access denied that..

He also tryed taking the slave drive out, and putting it in a caddie, to try delete the folders on 3 different pcs, with 3 different operation systems... 98, 2000, vista ... he is baffled and understands wholly what ive been going thru this past 2 months.

if anyone has a step by step procedure on how to delete these folders or some software that wipes those particular areas of the harddrive please please please please let me know... please , im so begging you, and as i said early ill be prepared to pay some money toward your valued help.

Best Regards
Pangaea

Ps. sorry for the spelling and attitude, but as u now relies, after 2 months of this, im left very very angry and fed up with the whole thing... all i dam well want to do is delete 3 folders on MY OWN pc,.. how dam complicated must this be???"

Pss. The only thing ive managed to do is rename the folders using "unlocker"

Windows = delete me 1
Program Files = delete me 2
Documents and Settings = delete me 3

Delet 3 folders from slave drive

Mon, 2008-09-15 23:01 by Steave_luice

Please my friend use the following way as a last option which must work in any condition.

FORMAT - try this way first.
1) Copy all you important data to master (new) disk from slave (old) by win explorer.
2) Go to my computer, right click your D drive which is old disk, and you will see the option in menu 'format'
click it.
3) copy all your data back from c drive to D now.

please let me know..

What happens when you try?

Thu, 2008-04-17 16:25 by admin

What's the exact error message you get when you try to delete these folders?

These three folders are exactly the ones that cannot be shared on Windows XP with Simple File Sharing enabled, like on XP Home.

My first guess is that you have no access rights to some folder or file in these three folders. The method to get around this is to take ownership of the folder first, then give yourself, or Everybody, full access rights. Then delete them.

Simpler method for deleting long file/folder name

Mon, 2007-12-31 19:39 by ddx (not verified)

I had this problem with long file name, just couldnt delete the folder. The solution is quite simple, you can just 'rename' folders to shorten its/their names and then delete! Just do it in Explorer, shorten each folders name until you can open up last folder, then delete!

Sometimes folder name too long itself

Thu, 2008-02-07 05:25 by astk1

Just thought it might be handy to make it really clear about short and long names. I had a folder with a really really long name (eg "Dorothy and Julie blah, blah, blah and so on and more blah, blah etc" that came about because of Nokia PC Suite syncing, and the folder contained a music file. Windows XP/Explorer wouldn't allow me to do anything with the folder - couldn't open, move, delete, or rename, couldn't delete within command window (cmd.exe) using del doroth~1 as seemed to be suggested in various forums. Here's how:
open command window (start, run, type cmd, press enter)
navigate to folder using "cd.." and "cd pathname" etc
type dir/x to see the actual real short name of the subdirectory AND CRITICALLY this may include an extension eg. "DOROTH~1.STR"
then type "cd doroth~1.str" (that is, whatever your short folder name is)
then delete the files in the directory (say, del *.* or use the short names trick again if necessary)
then cd.. to get back into the parent directory
then "rmdir doroth~1.str" to remove the empty subdirectory/folder

Thanks a lot!

Thu, 2008-02-07 09:29 by admin

Thanks for your good explanation! I have already incorporated it into method 8 above with an attribution to you.

As an early contributor you now also have your own blog on this web site. Please have a look at the "Blogger" forum for details.

Thanks, good hint!

Mon, 2007-12-31 20:46 by admin

Yes, it seems obvious, but sometimes the easiest things are overlooked.

Your hint has been incorporated in the main article, method 15.

The easiest way I found is

Tue, 2008-03-25 14:20 by NoireX

The easiest way I found is to download the programm "Unlocker" which simply deletes every reference to a folder. It also offers the possibility to delete the folder or document at the same time.

Yes, that's method 14

Tue, 2008-03-25 14:52 by admin

I also have Unlocker installed. It is a fine program and makes it easy to delete any recalcitrant stuff.

Recommended for everyone who has this problem more often.

sorry, i posted my post in the wrong area

Wed, 2008-04-16 17:19 by Pangaea

hi, im the guy that posted the farily lengthy post (at the top) regarding the 3 undeletable folders ive been having great trouble dealing with ..

Im not sure why it was posted up there, but its the most recent post in this thread.

I refare to the post subject "PLEASE FOR THE LOVE OF GOD"

New comments at the top

Thu, 2008-04-17 16:21 by admin

When you add a new comment, rather than a reply, it appears at the top. This is intentional, nothing to worry about.

ROBOCOPY saved my day !!

Wed, 2009-04-15 11:21 by gonzalongo

Hello everybody,

I got to this page trying to find info on how to delete a rogue folder that could not be removed on my desktop. And your ideas enlighted me. I had a folder that could not be removed due to its depth or number of subfolders. I tried chkdsk, miniwinpe, vistawinpe, etc

Then I rememberd the robocopy /MIR command.
So I created a folder called test and place a hello.txt file on it, then from the cmd I ran
robocopy /MIR "d:\test" "D:\doc&settsetc\roguefolder"
It took about 7 minutes but I ended up with just the hello.txt that could we wiped on the spot.

Robocopy is built in on vista.
I was using winxp, so I downloaded from microsoft. It's part of the win2003 resorce kit I believe and I think it's free.

Regards.
Gonzalo

Yes, it's free

Wed, 2009-04-15 13:51 by admin

Yes, robocopy is free. It is also one of my favorite and most-often-used tools.

Thanks for ths good hint!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.