Last Updated on March 17, 2026
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.

Understanding the Thumbs.db File Problem
1. Identify the Hidden Cache File
There is no one single reason for this message to appear on your screen. A very common cause is having a file called Thumbs.db sitting inside that folder. The Thumbs.db file is a hidden thumbnail cache file. It is used to store thumbnail images for the modern File Explorer thumbnail view..
2. Understand How Thumbnails Work
When you have pictures in a folder you are usually able to see small preview images of each one. That visual information is kept securely in the Thumbs.db file within that specific folder. If you try and delete the Thumbs.db file you will get an error similar to the previous error saying it cannot be deleted.

3. Clear Your Temporary Files
One thing you can try to get around this lock is to cleanup your system temp files. You can use a program such as the free and effective Ccleaner to wipe this data. Running a quick system clean often releases the locked file handle immediately.
Delete Thumbs.db Files via Command Prompt
1. Open an Elevated Command Prompt
You can also delete all the Thumbs.db files on your hard drive directly from a command prompt. To do this in Windows 10 or Windows 11 you need to open your Start menu and type cmd. You must right click the Command Prompt icon and choose Run as administrator to get the proper system permissions.
2. Navigate to Your Target Drive
If you have more than one drive or partition you will have to do this process separately for each drive. If you have an E drive then you need to switch to that specific location. Do this by typing E: at the prompt and pressing Enter.
3. Run the Deletion Command
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 long listing of all the Thumbs.db files that have been permanently deleted on the drive. Make sure you have that specific folder closed before running this command for the absolute best results.

Disable Thumbnail Caching in Group Policy
1. Launch the Group Policy Editor
If you want to prevent Windows from caching the thumbnails altogether then you can edit your local group policy. Click on your Start button and type gpedit.msc into the search bar. Press Enter to launch the Local Group Policy Editor tool on your desktop.
2. Navigate to the File Explorer Settings
You need to browse through the left pane menu to find the correct configuration folder. Go to User Configuration, expand Administrative Templates, and open Windows Components. Finally click on the File Explorer folder to view the available policy settings.
3. Modify the Caching Policy
Look for the specific policy named Turn off the caching of thumbnails in hidden thumbs.db files in the right pane list. Once you find it you need to double click it to open its properties window. Select the Enabled radio button and click Ok to apply your new settings.

For additional training resources, check out our online IT training courses.
Check out our extensive IT book series.






