On Mon, Mar 9, 2009 at 8:17 AM, John Aldrich
<[email protected]> wrote:
> Ooh... nifty. I could use a batchfile like that. :-) Care to post it
> (assuming it's not got any proprietary info. <G>)
Hmmm, actually, I lied when I said it's a batch file. It's a Bourne
shell script. ("Shell script" is how Unix spells "batch file".) I've
got the Unix utilities package from <http://unxutils.sf.net> in the
PATH. The Scheduled Task invokes said script with SH.EXE from said
utilities.
Also, the GNU "find" utility from same utilities has been renamed to
GFIND.EXE ('cause Microsoft has their own, unrelated FIND.EXE).
So, anyway, the RMSCAN.SH file contains a single line:
gfind C:/Company/Shared/Scanner -daystart -type f -a -mtime +2 -exec
rm \"{}\" \;
I had to use a shell script because CMD.EXE's quoting semantics are
too limited to pass an escaped quoted argument to GNU find.
FORFILES is probably easier if you have it.
-- Ben
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~