+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Script to delete *.tmp in Coding and Web Development; Around once a week we would like to delete the temp files from a folder and its sub-folders on our ...
  1. #1

    Join Date
    Jun 2006
    Location
    Manchester
    Posts
    58
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Script to delete *.tmp

    Around once a week we would like to delete the temp files from a folder and its sub-folders on our server. Obviously we can do it manually through a Windows search, I wondered if it was possible with a batch file or vbs script. All the files are *.tmp so I imagine the script would have to accomdate wildcards. Many thanks.

  2. #2
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    471
    Thank Post
    14
    Thanked 51 Times in 49 Posts
    Rep Power
    24
    DEL /Q yourdrive\yourdirectory\*.tmp ??

    (Use with caution)

  3. #3
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,540
    Thank Post
    112
    Thanked 89 Times in 75 Posts
    Blog Entries
    47
    Rep Power
    41
    del *.tmp /s /q

  4. #4
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    471
    Thank Post
    14
    Thanked 51 Times in 49 Posts
    Rep Power
    24
    /q = Quiet (don't ask)
    /s = This directory and subdirectories (equivalent to unix -r)

  5. #5

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,249
    Thank Post
    1,061
    Thanked 1,070 Times in 626 Posts
    Rep Power
    741
    Or download Agent Ransack:

    Agent Ransack - home

    Do a search for .tmp files, once they are all up - delete them.....



SHARE:
+ Post New Thread

Similar Threads

  1. Script to Delete Profiles - PLEASE HELP
    By Mr_M_Cox in forum Scripts
    Replies: 13
    Last Post: 22nd February 2013, 04:53 PM
  2. Script to delete profile at log off?
    By woody in forum Windows
    Replies: 74
    Last Post: 15th February 2013, 03:28 PM
  3. Script to delete certain folders
    By Pumaedition in forum Scripts
    Replies: 4
    Last Post: 22nd April 2008, 11:08 PM
  4. need a script to delete shortcuts
    By philtomo-25 in forum Scripts
    Replies: 2
    Last Post: 1st November 2007, 04:50 PM
  5. Script to delete printer
    By tosca925 in forum Scripts
    Replies: 2
    Last Post: 31st August 2005, 08:45 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •