BleepingComputer.com: Batch to delete Thumbs.db

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Batch to delete Thumbs.db

#1 User is offline   Vaine 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 116
  • Joined: 20-December 08
  • Gender:Male
  • Location:Somewhere in NewYork

Posted 06 February 2009 - 10:21 PM

I want a batch file to find and delete the multiple THUMBS.DB on the Local Disk (C:)

This is all I have which is a CMD Command.

del /s /q Thumbs.db


Is there a way to convert that into a batch command?

#2 User is offline   Billy O'Neal 

  • Bleepin Engineer GRADUATE
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Malware Response Instructor
  • Posts: 10,403
  • Joined: 17-January 08
  • Gender:Male
  • Location:Cleveland, Ohio

Posted 06 February 2009 - 10:52 PM


#3 User is offline   Vaine 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 116
  • Joined: 20-December 08
  • Gender:Male
  • Location:Somewhere in NewYork

Posted 06 February 2009 - 11:00 PM

How do I add the drive letter to this?

#4 User is offline   Billy O'Neal 

  • Bleepin Engineer GRADUATE
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Malware Response Instructor
  • Posts: 10,403
  • Joined: 17-January 08
  • Gender:Male
  • Location:Cleveland, Ohio

Posted 06 February 2009 - 11:31 PM

View PostBilly O, on Feb 6 2009, 10:52 PM, said:

Er... that is a batch command :thumbsup: Just fully qualify the path:

del /s /q C:\Thumbs.db

Billy3


#5 User is offline   Vaine 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 116
  • Joined: 20-December 08
  • Gender:Male
  • Location:Somewhere in NewYork

Posted 09 February 2009 - 06:58 AM

The batch file tells me that there is an error with the code. Sorry. I did not see that C: part haha.

#6 User is online   Andrew 

  • Bleepin' Night Watchman
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 7,422
  • Joined: 05-December 05
  • Gender:Not Telling
  • Location:Right behind you

Posted 09 February 2009 - 01:47 PM

Your original command ought to be fine without qualifying the path. Just type it into a txt file and name it something like "killthumbs.bat".
Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.
Posted Image
Boredom Software Stop Highlighting Things

#7 User is offline   Vaine 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 116
  • Joined: 20-December 08
  • Gender:Male
  • Location:Somewhere in NewYork

Posted 10 February 2009 - 07:19 AM

Do I have to make the CD\ code in there? My DOS Window is showing Documents and settings?

CD\
del /s /q C:\Thumbs.db

#8 User is offline   mysticduck 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 26
  • Joined: 08-April 08
  • Gender:Male
  • Location:Southern Oregon

Posted 13 February 2009 - 12:49 PM

Are there specific Thumbs.db files you are trying to get rid of, or just all the Thumbs.db files on the C: drive?
Stultorum infinitus est numerus

#9 User is offline   emucade 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 34
  • Joined: 15-April 07
  • Location:Santa Fe N.M.

Posted 14 February 2009 - 06:29 PM

not sure wear the thumbs.db are located but lets just say thay are in a directory called inernet\thumbs

Maybe this

run then cmd

copy con: delthumbs.bat
@echo off
cls
del c:\inernet\thumbs\thumbs*.db*
Pause
exit

"then press CTRL Z to save batch"
this might work. If you could tell me what directory the thumb files are in I could test this.

This post has been edited by emucade: 14 February 2009 - 06:37 PM

" If you want to be the best you better learn how do defend yourself,
Because when you are the best everybody wants to kick you’re a** "
My Dad 1986

#10 User is offline   Vaine 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 116
  • Joined: 20-December 08
  • Gender:Male
  • Location:Somewhere in NewYork

Posted 15 February 2009 - 11:44 AM

Thumbs.db is allover the C: drive. Usually in folders where pictures are

#11 User is offline   OldNick 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 9
  • Joined: 02-August 05

Posted 15 March 2009 - 07:23 PM

Sorry to butt in, but I have a similar problem

Code:
del AusPhotoForums\*.*

rem AND EVEN TRIED
del AusPhotoForums\thumbs.db

del \ausphotoforums\controls\*.*

pause
rmdir \AusPhotoForums
rmdir \ausphotoforums\controls
pause
rem Message "Folder is not empty"

It seems that DOS is not able to delete the Thumbs.db file. In Windows I am always prompted for deletion of Thumbs.db if I try to delete all files. In DOS I am simply being refused.

Can anyone help me from this aspect of it?

Thanks

Nick

#12 User is offline   OldNick 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 9
  • Joined: 02-August 05

Posted 16 March 2009 - 02:01 AM

It's OK I sorted it :thumbsup:

Nick

#13 User is offline   OldNick 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 9
  • Joined: 02-August 05

Posted 16 March 2009 - 02:41 AM

You want to delete ALL thumbs.db files on your computer, right?

There used to be deltree. A powerful but dangerous command.

However:
In a text file called KillThumbs.bat"

attrib /s -r -h -s "c:\thumbs.db"

del /s /q "c:\thumbs.db"

****USE AT YOUR OWN RISK. ****

copy a folder that has lots of subfolders with thumbs.db in them to another location and run it over that first
- ****CHANGING THE FOLDER CALLS ABOVE TO SUIT.****
Leave Echo on at least for the test, so you can see if it's doing what you want to this test folder and its subfolders.


It works in theory. It will take a while to run, because it will search every directory of your C drive twice.

****DO NOT GET ANYTHING WRONG! THIS IN THEORY COULD WIPE YOUR DRIVE.****

I have tied it on a test folder that I copied. It is my \nickdocs\photos folder, and I copied it to the c:\ root directory. IT worked on that folder and all its subfolders.

Good Luck

Nick

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users