Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How to create a Batch file in Windows to delete Temp Files

How to create a Batch file in Windows to delete Temp Files

Scheduled Pinned Locked Moved Windows Forms
tutorial
4 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jayaraman B
    wrote on last edited by
    #1

    Dear All, Can any one tell me how to create a Batch file in Windows to Delete files from Specific Folder in my local Machine say for Ex: E:/Temp/all files in it. Thanks & Regards, Jayaraman B

    Jayaraman B

    G 1 Reply Last reply
    0
    • J Jayaraman B

      Dear All, Can any one tell me how to create a Batch file in Windows to Delete files from Specific Folder in my local Machine say for Ex: E:/Temp/all files in it. Thanks & Regards, Jayaraman B

      Jayaraman B

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      You can use del command. But why don't you delete those files from your program? Or if you have not got a program and only a bat file then why did you post in this forum?

      my articles

      J 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        You can use del command. But why don't you delete those files from your program? Or if you have not got a program and only a bat file then why did you post in this forum?

        my articles

        J Offline
        J Offline
        Jayaraman B
        wrote on last edited by
        #3

        The Program is some thing that we cant control(we dont own the code for it) Till now i delete my Temp Files and Cookies / Temp Internet Files every EOD because of the issues in the Programs in Web. Hence in need of this Batch file. Please revert wats the code to Delete the Temp files and Temp Internet Files through Bat file. Thanks in Advance.

        Jayaraman B

        G 1 Reply Last reply
        0
        • J Jayaraman B

          The Program is some thing that we cant control(we dont own the code for it) Till now i delete my Temp Files and Cookies / Temp Internet Files every EOD because of the issues in the Programs in Web. Hence in need of this Batch file. Please revert wats the code to Delete the Temp files and Temp Internet Files through Bat file. Thanks in Advance.

          Jayaraman B

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Why don't you write a c# application? If you are writing bat file then it is not correct forum. Anyway you can do it like this: cd "path to folder" del /q * It will delete all files. If you write del /f /q * then it will force Force deleting of read-only files.

          my articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups