Skip to content

Instantly share code, notes, and snippets.

@dd86k
Last active March 16, 2016 23:57
Show Gist options
  • Save dd86k/7a06baa61ae1925f8d58 to your computer and use it in GitHub Desktop.
Save dd86k/7a06baa61ae1925f8d58 to your computer and use it in GitHub Desktop.
Deletes the Thumbs.db files which is the thumbnail database for Windows whenever "View an icon instead of an thumbnail" option is unchecked.
@ECHO OFF
WHERE /R .\ Thumbs.db > TEMP
IF ERRORLEVEL 1 GOTO L1
GOTO L0
:L0
FOR /F %%B IN (TEMP) DO (
DEL /Q /S %%B
)
DEL /Q /S TEMP
ECHO Done.
PAUSE > NUL
GOTO EOF
:L1
ECHO No Thumbs.db files found.
PAUSE > NUL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment