Results 1 to 4 of 4

Thread: Creating a batch file to find and delete certain files

  1. #1
    Join Date
    Jul 2006
    Posts
    191
    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.

  2. #2
    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.

  3. #3
    Join Date
    Apr 2009
    Posts
    460

    Re: Creating a batch file to find and delete certain files

    Try using a batch file creator software. There are few of them available on the web. This tool help you to create a batch file through which you can do whatever you want. I had used this long before to create a batch file which can move all my folders to a new directory. Batch File Creator is a simple tool to use. There are basic as well as advance tools that you can use for creating batch file. So better check before downloading a software. You can check the functionality it offers or else you wont get the kind of output you are looking for.

  4. #4
    Join Date
    Apr 2009
    Posts
    745

    Re: Creating a batch file to find and delete certain files

    You can do the same through a third party software also. If your system has too many duplicate files you can try using a Duplicate file finder. You can run the same to delete files from your system. Free Duplicate File Finder is one of the best that you can use. It is free and works really nicely. You just have to run the tool and it will scan the system for duplicate file. It gives you simple comparison process also. You can choose files which are additional and delete the same. This is also a time saving process. It is more reliable compare to batch file.

Similar Threads

  1. Replies: 4
    Last Post: 03-04-2012, 06:31 PM
  2. Create a batch (. Bat) MS-DOS to delete files
    By Aarya in forum Software Development
    Replies: 9
    Last Post: 08-09-2011, 12:58 AM
  3. Need batch file to delete user files in Windows XP
    By mcamp32 in forum Windows XP Support
    Replies: 1
    Last Post: 26-05-2011, 10:54 PM
  4. Creating a batch file to launch programs based on time
    By rblanda in forum Tips & Tweaks
    Replies: 3
    Last Post: 31-12-2009, 10:19 PM
  5. Batch file to delete files dynamically
    By freelancer24 in forum Windows Server Help
    Replies: 3
    Last Post: 08-02-2009, 02:33 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,665,480.92891 seconds with 17 queries