+ Post New Thread
Results 1 to 6 of 6
Scripts Thread, need script to delete .tmp files from home folders in Coding and Web Development; just did a scan on one of the server drives containing home folders. It has 335mb of .tmp files. I ...
  1. #1
    projector1's Avatar
    Join Date
    Nov 2005
    Posts
    461
    Thank Post
    70
    Thanked 1 Time in 1 Post
    Rep Power
    19

    need script to delete .tmp files from home folders

    just did a scan on one of the server drives containing home folders. It has 335mb of .tmp files.

    I need a script & a batch file so that i can schedule it to run every evening on the drive containing just home folders. (schudule the batch file only)

    (am kindly asking for both vbscript and batch file so that i can see the coding that is used create them)

    much appreciated!
    yes i know it is saturday, but in the last 3 hours i have managed to do 6 tasks that i have been delaying whilst in school due to lack of free time!

  2. #2
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    470
    Thank Post
    14
    Thanked 50 Times in 48 Posts
    Rep Power
    23
    well batch would be something like
    del /s drive:\topleveldir\*.tmp

    probs best to include the /p switch until your sure it's working (prompt before delete for each file).

  3. Thanks to Jona from:

    projector1 (8th March 2008)

  4. #3

    Join Date
    Jun 2005
    Posts
    223
    Thank Post
    6
    Thanked 8 Times in 8 Posts
    Rep Power
    30
    I use a similar script. If you add

    del /s drive:\topleveldir\*.tmp >> %date:~0,2%-%date:~3,2%-%date:~6,9%.log

    a log file (where the filename is today's date) is generated which contains all the filenames it has deleted / any error messages.


  5. Thanks to _Bob_ from:

    projector1 (8th March 2008)

  6. #4

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    You don't even need a script - download Agent Ransack, stick in your search parameters, when Agent Ransack has finished doing its job, highlight the files and delete them....
    I am sure you could do the same thing using another desktop search tool.....

    Agent Ransack:

    http://www.mythicsoft.com/agentransack/

  7. #5


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,693
    Thank Post
    352
    Thanked 798 Times in 717 Posts
    Rep Power
    347
    I need a script & a batch file so that i can schedule it to run every evening on the drive containing just home folders. (schudule the batch file only)
    Does Agent Ransack allow sheduling + auto action?

  8. #6

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    Quote Originally Posted by kmount View Post
    Does Agent Ransack allow sheduling + auto action?
    Don't think so, I could knock up a script which would make it do though......

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 1st July 2014, 08:34 AM
  2. Replies: 15
    Last Post: 19th September 2007, 10:46 PM
  3. Replies: 0
    Last Post: 20th August 2007, 02:20 PM
  4. Replies: 7
    Last Post: 17th May 2007, 11:42 PM
  5. Replies: 3
    Last Post: 25th September 2006, 12:27 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
  •