1. #1
    Unregistered

    What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    Hi friends I want to create a batch file which automatically deletes my temp files and other useless files from my computer please tell me how can I do it, please tell me the procedure for the same?



  2. #2
    Nidhi Verma Array
    Join Date
    May 2012
    Posts
    80

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    the steps to delete are:
    1) open up notepad: the easy way to do this is by holding down the Windows key(between ctrl and alt key in most of the computers) and then hit R. type in notepad.exe and hit enter

    2) paste in each snippet of code into notepad and then save the file with the extension.bat

    3) @echo
    del/ s/ q"%userprofile%\cookies\*.*"

    4) click file then save as

    for more information you may even log on to: http://www.wikihow.com/Rid-Your-Comp...emporary-Files

  3. #3
    Surender Gora Array
    Join Date
    May 2012
    Location
    Delhi
    Posts
    189

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    Disk clean up BATCH file

    Using batch file you can delete all temp files which might have built uo during installation of programs, such files eats up lot of soace on hard disk.
    Such a batch file can be created using notepad.

    Follow the steps given below :

    -> Open notepad , write in first line :
    c:\windows\system32\cleanmgr.exe /dc /sageset: 1
    ->
    In second line write : c:
    ->
    ln third line : cd c:\windows\prefetch
    ->
    ln fourth line : del *.* /q

    Now save this file as clean.bat , select Save type as "All files "
    Save path - C -> Windows -> System 32


    Now go to My computer -> C -> Windows -> System 32

    Now double click the clean.bat file . A new window will open up, select which folders you want to clean up. Then OK.

  4. #4
    kranthi Array
    Join Date
    May 2012
    Posts
    388

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    You can delete your temp files by entering a keyword of temp in the run command also it is much easy procedure to do so.Otherwise you can go through the C drive of the computer and there you can find the user's temp files in the system 32 folders and any other.from there you can delete the files of temp and recently opened apps or files which are unwanted.

  5. #5
    imman Array
    Join Date
    Jun 2012
    Posts
    302

    Unhappy Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    %%% Hi dude %%%



    Type the following code in notepad,



    cd\
    cd C:\Documents and Sttings\$usernem$\Local Settings\
    del /Q Temporary Internet Files
    echo Deleting Files
    echo File Deleted
    mkdir Temporary Internet files
    exit




    Save this file with the extension .batch.

    Now run the batch file that you created to delete those files.






    Hope it helps!!!




    %%% Thank you %%%

  6. #6
    vishal21bhadani Array
    Join Date
    Mar 2013
    Posts
    434

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    hi, friend .

    >> you want to create batch file that can remove you temp file.

    >> for that just open notepad and write:

    ECHO This Batch File deletes all unwanted Temporary files from your
    system ECHO Now we go to the Windows\temp directory.
    cd %temp%
    ECHO Deleting unwanted temporary files....
    del *.tmp
    ECHO Your System is Now Clean

    >> now save this file as any name that you want but extention must be .bat .

    >> like temp.bat

    >> now when ever you want to delete temp file just click on it.

    >>> i hope you have understand me .

    >> all the best


  7. #7
    sivaditya Array
    Join Date
    Mar 2013
    Location
    Guntur
    Posts
    324

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    Its a good idea to create a batch file to delete your temp files rather than deleting manually every time.

    Now I will explain how to delete temp files and internet temp files

    @echo off
    cd /d %temp%
    for /r %%a in (*.*) do (
    del /f /q %~a
    ) >nul
    cd /d "%UserProfiles%\Local Settings\Temporary Internet Files
    for /r %%b in (*.*) do (
    del /f /q %~b
    ) >nul


    all the best

  8. #8
    heemanshubhalla Array
    Join Date
    Sep 2012
    Location
    India
    Posts
    570

    Re: What is the procedure to create a batch file which can delete my temp files and other unnecessary file from my computer?

    METHOD #1
    Batch Files are programming files created using Batch Programming in Dos Editor availaible in MS_-DoS

    1. Here is code for Creating a BAtch file that delete all user data. This file is created by me and i use this file everyday on my computer

    2. First copy and paste code given below in a simple text file

    c:
    cd/
    cd windows
    cd temp
    del *.*
    cd/
    cd %temp%
    del *.*
    cd/
    cd windows
    cd prefetch
    del *.*


    3. Then Save this files as del.bat
    4. Now When you execute this file everytime your temporary files will be deleted

    METHOD #2

    1.
    Press windowskey + r and type in :-"prefetch" and Hit Enter
    2. This will open Prefetch temporary files
    3. Select All files and delete all files that can be deleted

    MEHOD #3

    1. Press windowskey + r and type in :-"%temp%" and Hit Enter
    2. This will open temporary files
    3. Select All files and delete all files that can be deleted

+ Reply to Thread

Similar Threads

  1. Replies: 92
    Last Post: 13-09-2013, 11:43 AM
  2. Replies: 8
    Last Post: 27-04-2013, 04:51 PM
  3. Replies: 20
    Last Post: 23-01-2013, 10:18 AM
  4. Replies: 7
    Last Post: 17-12-2012, 10:27 PM
  5. How to restore SULFNBK.EXE file?
    By Unregistered in forum Windows Forum
    Replies: 9
    Last Post: 01-10-2012, 11:47 PM