Sometimes I can’t delete a folder, because it contains thumbs.db. I have a lot of folders (which contain images too) and I will need to move them to a different place and delete the original folder. But I am getting this error: the folder can’t be deleted because "thumbs.db" is being used by another process.
Moving and deleting is made in c#, and right now it skips deleting the folders that have thumbs.db, which will result in a lot of empty folders. Is there a way to delete the folder even if it has that file?
Sometimes I can’t delete a folder, because it contains thumbs.db . I have a
Share
am submitting my comment as an answer because it is much more readable this way:
You can switch off a creation of these files:
in Registry Editor go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
and set NoThumbnailCache entry’s value to 1.
If you don’t have this entry , just create it (DWORD 32).
For Win 7 Ultimate/Professional version:
HKEY_CURRENT_USER\Software\Microsoft\ Windows\CurrentVersion\Explorer\Advanced
DisableThumbnailCache (DWORD also)
To delete all already existing files create a batch file with the following content:
and run it as administrator