The thumbs.db file is automatically created within a folder when the thumbnails view is used to view that folder.
To disable the creation of the thumbs.db file, follow these steps:
Open folder options in control panel.
Then navigate to the view tab.
Under the advanced settings box, select "Do not cache thumbnails."
Click the Apply button.