Re: How do I clear out files within a directory? Help with script automation...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: paul dorn (paul_at_seismicom.net)
Date: 05/05/04

  • Next message: Joe: "File Server sessions"
    Date: Wed, 5 May 2004 15:15:23 -0700
    
    

    The script that works!!!

    rem @echo off
    rem ***Remove Quarantine Files***
    c:
    cd \
    cd %ALLUSERSPROFILE%
    cd App*
    cd Sym*
    cd Nor*
    cd 7*
    cd Qua*
    del *.* /Q

    Thanks to Bill Sanderson & Dave Patrick for getting me thinking in the right
    direction...

    Hope this is useful for others...

    Paul G. Dorn

    "Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
    news:O5CN7oiMEHA.1556@TK2MSFTNGP10.phx.gbl...
    > This should work;
    > del %ALLUSERSPROFILE%\Application Data\Symantec\Norton AntiVirus Corporate
    > Edition\7.5\Quarantine\*.*
    >
    > (note: above is all on one line)
    >
    > --
    > Regards,
    >
    > Dave Patrick ....Please no email replies - reply in newsgroup.
    > Microsoft Certified Professional
    > Microsoft MVP [Windows]
    > http://www.microsoft.com/protect
    >
    >
    > "paul dorn" wrote:
    > Hello Windows Geeks:
    >
    > I have a interesting project in mind...I want to setup a script,
    preferable
    > a batch file to be run at logon, that will clear out the entire contents
    on
    > a specific directory.
    >
    > More poignantly, Symantec Anti-Virus software moves infected files into a
    > local directory called "Quarantine". Now SAV will continue alerting for
    > found viruses on a computer eventhough those files get moved into
    > "Quaratine" Also, the more the "Quarantine" directory fills up with files,
    > the slower the application will respond when launched, ran, etc...
    >
    >
    > Therefore, Does anyone know of any script diction that would clear out the
    > files from
    > C:\Documents and Settings\All Users\Application Data\Symantec\Norton
    > AntiVirus Corporate Edition\7.5\Quarantine at logon?
    >
    >
    > Best Regards,
    > Paul G. Dorn
    > Network Administrator
    > Seismicom
    >
    >
    > P.S.
    > If this is the wrong newsgroup, then tell me where to post this then!
    >
    >


  • Next message: Joe: "File Server sessions"

    Relevant Pages

    • Re: Where user is logged on
      ... You have to run a script to find it out during logon. ... Best regards ... Meinolf Weber ...
      (microsoft.public.windows.server.general)
    • RE: Deleting FIles
      ... parameter on the DEL command - this should delete a hidden file ... When the script runs, who is it running as (the current user, ... The computername part of the code is ... I think that it actually runs as the SYSTEM account, ...
      (microsoft.public.windows.server.scripting)
    • gzip archives coming up invalid!
      ... turns out they are all corrupt! ... This is the script I am using, maybe there is a problem with it?? ... del $OLDDATE.var.tar.gz ...
      (RedHat)
    • Bash scripting problems
      ... in /root/.bashrc there is an alias which breaks my script in the following ... When I need to copy or del a file the rm -i and cp -i are preventing things ... Manufacturers of Proline Computers ...
      (Fedora)
    • Re: DEL command help
      ... filenames must be less than ... ... 'del' command with 'echo del'. ... I couldn't get the command working. ... >> the script becomes too fragmented and awkward to reconstruct). ...
      (microsoft.public.win2000.cmdprompt.admin)