Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

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

1. ## Error “Cannot Delete folder: The directory is not empty”

Hello.

I deleted a folder and it had nothing in it.....0 bytes.....but when I try and empty the recycle bin..........it gives me this error

"Cannot remove folder pics: The directory is not empty"

The folder I am trying to delete is in the USB thumb drive.

No matter what I try, it will NOT delete......any ideas?

• go to star menu and run and type in cmd

then delete the folder using

Code:
rmdir /S C:\path\to\folder
really do make sure theres nothing in there you want though

Here is what I type but did not work:

Code:
rmdir / s G:\123

G:\123, Are you sure (Y/N)? y

G:\123\1 - The directory is not empty.

G:\123\2 - The directory is not empty.

G:\123\3 - The directory is not empty.

G:\123\4 - The directory is not empty.

The folder I am trying to delete is 123. Inside the main 123 folder, there are 4 subfolders (1,2,3,4).

All the folders are empty, however, when I do the Right click on the Properties of the usb thumb drive, it's showing 17GB of used space. It does not make since to me. How can there be used space in the usb thumb drive when all the folders are empty?

I also the the Right click of Properties for the 123 folder and it's 0 Bytes.

• what about using the deltree command instead of rmdir then? short of anything else I suppose you could do it from a linux live disk

• Or format the drive, if worst comes to worst.

i coded with c#

• Delete it in safe mode

• ## LCD Projector Rentals

We have cost effective solutions at the best prices Guaranteed
We are open 365/24/7 For rental , sales and service
We can deliver results within your budget in one hour in the Miami area 2 hour with in the tri-county area.Place the phone number :Call now at 786-426-0062

• ## Error fixed!

Hi,

I have also encountered problems like this before and I found a solution to it.

I would like to recommend to you LONG PATH TOOL.

It is basically designed to fix errors like this.
you can check their website at

http://longpathtool.com

• Originally Posted by creativemind
Hello.

I deleted a folder and it had nothing in it.....0 bytes.....but when I try and empty the recycle bin..........it gives me this error

"Cannot remove folder pics: The directory is not empty"

The folder I am trying to delete is in the USB thumb drive.

No matter what I try, it will NOT delete......any ideas?

If you haven't gotten it deleted yet, try Unlocker although you should be able to clean in Safe Mode. I only recommended Unlocker because I have used it for stubborn files before and it worked. Sometimes you have to set Unlock to remove the file on a reboot.

• ## Dantekasas

LONG PATH TOOL

Do you have error messages?, like :
• Path too long
• Error cannot delete file: cannot read from source file or disk
• Cannot delete file: Access is denied
• There has been a sharing violation.
• Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name.
• The source or destination file may be in use.
• The file is in use by another program or user.
• Error Deleting File or Folder
• Make sure the disk is not full or write-protected and that the file is not currently in use.
• Error Copying File or Folder.
• Cannot remove folder.
• The filename or extension is too long.
• Path too deep.
• Destination Path Too Long.
• Could not find this item.
• Filename is not valid.
• The file could not be accessed.
• The path you entered, is too long. Enter a shorter path.
• File Name could not be found. Check the spelling of the filename, and verify that the file location is correct.

•