Go Back   TechArena Community > Technical Support > Computer Help > TroubleShoot 98
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: ,

Sponsored Links


Creating a batch file to find and delete certain files

TroubleShoot 98


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-06-2009
Damien25's Avatar
Member
 
Join Date: Jul 2006
Posts: 191
Sponsored Links
When I go into a folder on my computer, lets say C:\Temp, then I can see that it everytime fills up with too many .tmp word files and I have to manually open it everytime and delete all the files. Same is the case with the .tmp files when I search it. Therefore I was wondering if I can make some bat file that will automatically delete all the files from those folders? How do i create such batch file, any help would be appreciated.

Reply With Quote
  #2  
Old 30-07-2009
agarwalm11's Avatar
Member
 
Join Date: Sep 2005
Posts: 226
Follow the below command to delete files by using the bat files:
  1. You will need to first of all open a notepad.
  2. After that you will have to type in the following code:
    Code:
    @echo off
    deltree C:\Directory you want to delete /s for quietly
  3. Save the same file as deletetmpfile.bat
  4. Double click on the same bat file to delete all the tmp files automatically.

So basically you just need a text file like notepad and then write the code which is stated above and save it as a .bat file.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > TroubleShoot 98


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Creating a batch file to find and delete certain files"
Thread Thread Starter Forum Replies Last Post
Creating a Batch file in order to add a website as a wallpaper in Windows Xp? BSOD.K Customize Desktop 4 03-04-2012 06:31 PM
Create a batch (. Bat) MS-DOS to delete files Aarya Software Development 9 08-09-2011 12:58 AM
Need batch file to delete user files in Windows XP mcamp32 Windows XP Support 1 26-05-2011 10:54 PM
Creating a batch file to launch programs based on time rblanda Tips & Tweaks 3 31-12-2009 09:19 PM
Batch file to delete files dynamically freelancer24 Windows Server Help 3 08-02-2009 01:33 AM


All times are GMT +5.5. The time now is 12:40 PM.