TechArena Community

TechArena Community (http://forums.techarena.in/)
-   TroubleShoot 98 (http://forums.techarena.in/troubleshoot-98/)
-   -   Creating a batch file to find and delete certain files (http://forums.techarena.in/troubleshoot-98/1072126.htm)

Damien25 02-06-2009 09:18 PM

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.

agarwalm11 30-07-2009 04:06 AM

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.

michaels 10-01-2014 05:35 PM

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.

Orton 11-01-2014 09:58 AM

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.


All times are GMT +5.5. The time now is 09:57 PM.