22 Comments


  1. Hi Mario,

    Awesome little script you’ve wrote. I’ve just used it to clear up a whole bunch of logfiles and it does the job a treat!

    Interesting to learn about the forfiles command too, I think I need to refresh my knowledge of the Windows CommandLine!

    All the best,

    Craig

  2. Elros Elrond

    Hi,

    Thanks a bunch for the script.
    Too bad it doesn’t run on my WIn XP :(
    It runs perfectly on my Win 2K3 though :)

    e.e


  3. Hi Elros,

    Thanks for contacting me. I’m glad the script is working for you. Yes, that’s right. The script is for Windows 2003 Server computers only. The reason is the forfiles command.

  4. Elros Elrond

    Hi Mario,

    Turns out if you just copy forfiles.exe and choice.exe from a working Windows 2003 machine, your script works for XP as well. I just tried it yesterday :D

    An alternative for XP to achieve the same feat might be found at http://home.mnet-online.de/horst.muc/horst.htm though (see DELAGE).

    e.e


  5. Hi Elros,

    That’s good to know. I didn’t try copying those files to my Windows machine. If I had tried that, I would have saved myself a lot of anxiety when I was testing my batch program on my employer’s Windows Server 2003 computer(s). :-)

  6. Eric Pfleckl

    Great script. It worked like a champ. Thanks!

  7. Senthil

    Hi Mario,
    This script helped me a lot.
    Thanks.
    Thank you very much.

    Senthil.S

  8. Will

    Hi Mario

    There are lots of folders under the windows\system32\logfiles directory. (some are 2GB) Can i backup these folders adn leave a week of log files or can i only do this in the main directory.

    Cheers

    Will

  9. Ebbsa

    Hi Mario,

    Thanks for the script; it works great. Is there a way to delete a file on a remote server using a userid and password (possibly network userid and password)?

    Thanks,

    Ebbsa

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>