|Home > All Tips > Microsoft Windows
The Action Can't be Completed Because the Folder or a File in it is Open in Another Program Message
Computers are always renaming, moving and deleting files and most of the time the process goes pretty smoothly. But sometimes there are reasons why you can’t do this, for example if you have a file open you won’t be able to move or delete it. Other times you can’t perform this action through no fault of your own and rather because of a glitch in Windows keeping you from doing what you want to do.
When trying to rename, delete or move a folder you may get a message that says “The action can't be completed because the folder or a file in it is open in another program”. It won't give you any information as to what program has the folder or file open and you may still get this type of message even if you have any programs that were accessing the file closed. This can be very frustrating if you are unable to move or delete the file or folder you are trying to work with.
There is no one reason for this message but a very common cause is having a file called Thumbs.db in that folder. The Thumbs.db file is a thumbnail cache file and is used to store thumbnail images for Windows Explorer's thumbnail view. So when you have pictures in a folder and are able to see small preview images of each one then that information in kept in the Thumbs.db file within that folder. If you try and delete the Thumbs.db file you will get an error similar to the previous error saying it can’t be deleted.
One thing you can try to get around this is to cleanup your temp files with a program such as the free and effective Ccleaner.
You can also delete all the Thumbs.db files on your hard drive from a command prompt. To do this you need to open a command prompt from Accessories. If you are running Vista or Windows 7 then you should right click the icon and choose Run as administrator. If you have more than one drive or partition you will have to do this process separately for each drive So if you have an E drive then you need to switch to the E drive by typing E: at the prompt.
Once you are on the drive where you want to delete the Thumbs.db files simply type del /ash /s thumbs.db and press enter. You will get a listing of all the Thumbs.db files that have been deleted on the drive. Make sure you have that folder closed before running this command for best results.
If you want to prevent Windows from caching the thumbnails altogether then you can edit your local group policy.
- Click on Start, then Run and type in gpedit.msc
- Browse to User Configuration\Administrative Templates\Windows Components\Windows Explorer
- Look for Turn off the caching of thumbnails in hidden thumbs.db files in the list
- Once you find it, double click it to open its properties and then enable it and click Ok.
Windows Group Policy Editor Overview
How do I get to a DOS prompt?
Changing Folder Appearance and Other Icons
Setting Folder Views for Windows Explorer/My Computer