Link to home
Start Free TrialLog in
Avatar of tigermatt
tigermattFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VBS to clear out UCEArchive

I would like a VBS that can look at a certain directory and delete files created over a week ago.

This will run once a day (as a scheduled task preferably) to look at my Exchange Server's UCEArchive folder - where suspect spam mail is stored - and delete any files in that folder which were created over a week ago. I need this grace period between mail going in there and being deleted so we can retrieve it if it was legitimate.

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of chandru_sol
chandru_sol
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tigermatt

ASKER

That's brilliant, thank you. (Points increased as I have another question below)

How do I make it run as a scheduled task? Can I use the following command?
%windir%\system32\cscript.exe "N:\My Settings\Desktop\ucearchive cleaner.vbs"

Thanks
-tigermatt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Brilliant,

thanks Chandru
Glad I am of help!