Modifying a script (rookie) - Delete all files in a folder

Discussion in 'Scripting' started by neo, Jul 22, 2005.

  1. neo

    neo Guest

    How do I set perameters to delete only files from the last 30 days using the
    existing script i found on the repository:
     
    neo, Jul 22, 2005
    #1
    1. Advertisements

  2. Hi,

    In the article below there is a WSH script (vbscript) by Michael Harris
    that deletes files that has not been modified in x days old in a
    specific folder and all subfolders.

    Newsgroups: microsoft.public.scripting.wsh
    Date: 2002-10-07 08:12:33 PST
    http://groups.google.co.uk/group/microsoft.public.scripting.wsh/msg/14df6623fc552446?dmode=source

    If you want to only delete files that are newer and not older than
    the specified number of days,

    change
    if dtlastmodified < vKillDate then

    to
    if dtlastmodified > vKillDate then
     
    Torgeir Bakken \(MVP\), Jul 22, 2005
    #2
    1. Advertisements

  3. neo

    neo Guest

    something like what this simple app does:

    http://peccatte.karefil.com/software/Purge/DelendaEng.htm
     
    neo, Jul 22, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.