Error “Cannot Delete folder: The directory is not empty” Fix

There are many problems I’ve come across while working the computer help-desk. One of the common issues I’ve encountered is one that involves folders not deleting properly. When this issue occurs, an error message appears that says “Cannot Delete foldername: The directory is not empty“.

This problem can happen in Windows XP, Windows 7 and Vista. Usually, the problem can be solved by with a Chkdsk scan. This can be done be following these steps.

  • Windows XP: Go to Start > Run. In the Open: line type CHKDSK /F and press Enter.
  • Windows 7 & Vista: Click the Windows orb and type CHKDSK /F in the Start Search box and press Enter.

Note: If the folder you are trying to delete is located on a drive that is not your C: drive, add the drive letter to the end of the command. Example: CHKDSK /F E:

Running Chkdsk in Windows 7

If you used a drive letter in the command above, you will get a prompt about dismounting the drive. Type Y for Yes and press Enter.

Most likely, you will get a message like the following:

Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)

Chkdsk prompt

Type Y for Yes and press Enter on your keyboard.

Nothing will happen just yet. You’ll have to restart your computer, to let the scan run. Once the scan is completed, try to delete the folder. You should be able to delete it just fine because CHKDSK has fixed the errors preventing it.

Comments

  1. kailash vyas says

    ty sir for ur services ………this is my last try to ths ………its working 20000000000000 per

  2. ParaBolt says

    LOL I got a folder “WugYrLtl” in my Program Files directory [Win XP]. Can’t delete using Chkdsk… Can’t delete using fancy software.. AntiVirus can’t delete it! Any other solution? Folder is of 0 bytes, Read-Only… and if I try to rename-move it gives Access Denied message. Thanks.. for future replies?

  3. Garvin says

    Mitch:

    I can only echo the gratitude expressed by the previous people. Your solution was concise, easy to understand and execute, AND IT WORKED!!!.

    THANK YOU VERY MUCH.

    Garvin

  4. Helvetica says

    Thankyou thankyou thankyou. For three days I have been reading dozens of suggestions on forums, downloading various weird and wonderful programs, trying all kinds of things to get rid of a 0 byte file/folder on my little mp3 player (like an Ipod but not an Ipod). Nothing worked, not even Total Commander, not using DEL… in the Command line. I found your page and within 2 minutes the file could be deleted (Note for anyone else deleting a file from an ipod-like device and XP: Ignore the warning that it is not a Windows compatible drive, click Y for yes, and later click N for No when it asks whether it should save the faulty data as a file).
    Many many thanks again.

  5. Adil says

    100% working method

    thanx a lot man …. I had tried evrything from changing permissions to using ‘ unlocker ‘ just evrything ..

    but in vain …

    CHKDSK method is the BEST WORKING METHOD INDEED !!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>