![]() |
|
Scripts - Cleanup By Age
DescriptionSchedule this script to run periodically in order to keep from accumulating too much "junk". You will be able to automate the deletion of files and folders based on age. Results can be emailed (if run from a Windows server) or a report will be generated in your "My Documents" folder. If you only want to see how much space you could recover or simply want to play without having to worry about deleting something important, make sure you set testmode to "on" (or "true" or "yes" or "1"). DownloadDownload CleanupByAge script (~6KB) UsageCleanupByAge Revision History
-----------------------------------------------------
April, 19 2004
-----------------------------------------------------
- Cosmetic changes
- Reports number of folders deleted
-----------------------------------------------------
March 30, 2004
-----------------------------------------------------
- Cosmetic changes
-----------------------------------------------------
March 29, 2004
-----------------------------------------------------
- Added option to only process folders
- Enhanced error messages to include script section
that caused the error
-----------------------------------------------------
June 5, 2003
-----------------------------------------------------
- Added option to not remove folders
-----------------------------------------------------
December 15, 2001
-----------------------------------------------------
- If email address is provided, but for some reason
an address cannot be sent, a log file will be
created so that reporting information is not lost.
- Error handling finally added. Errors will be
logged inline in the report.
- Logfiles are not written to a "Cleanup Logs"
folder that is created in "My Documents". If the
folder does not exists, it will be created.
- Log file naming has changed to list the path
before the date/time. Should allow for easier
grouping in Windows Explorer.
-----------------------------------------------------
December 13, 2001
-----------------------------------------------------
- Fixed problem where files/folders were deleted
only if age was exceeded by a day. Now files are
deleted if their age is greater than or equal to
the threshold number of days.
- Cosmetic changes.
- Added options for date attributes other than
only allowing deletion based on file creation
date.
-----------------------------------------------------
December 12, 2001
-----------------------------------------------------
- Modified command line options to allow for
drag-and-drop folder cleaning.
- Checks to see if what was passed as the starting
folder exists and is indeed a folder.
- E-mail address arguments are now optional.
- If no addresses are passed, the script
will generate an HTML file locally. This means that
the script is now usable on workstations and not
just servers.
- If only "notify" or "from" are passed, the
option not passed uses the value from the
option that was passed.
-----------------------------------------------------
December 11, 2001
-----------------------------------------------------
- Folder deletion added.
- Documentation in the form of comments added.
- Added graphical usage information at end of report.
-----------------------------------------------------
December 10, 2001
-----------------------------------------------------
- Modified for command line use instead of requiring
the script to be modified for every instance.
-----------------------------------------------------
November 27, 2001
-----------------------------------------------------
- Script created.
|
contact info
Email: info@yvg.com Phone: 270.462.3557 |
![]() |
|