By Bryan Keadle

We keep a number of logs and various backup files. These files can get dated, and I wanted an easy way to be able to schedule a task to run that would prune these files based on age. My utility, (Del)ete (Days) (Old) (DelDaysOld.exe) does just that.

By default, you specify a root directory to start from, and it will process all subdirectories, deleting files older than the number of days you’ve specified. For more granular control, an .INI can be created like this to provide the indicated options:

;=== Multiple directories specified, delimited by pipe delimiter
Dir2Process=Dir1 | Dir2 | Dir3 | …

;=== file specifications, delimited by pipe

;=== Confirm deletions

;=== number to specify the number of subdirectories deep to process. Default “*” is to process all subdirectories

;=== Age of files’ timelimit (defined below) to delete. Example below specifies to delete files that are 0 years, 14 days, 0 hours, 0 minutes, and 0 seconds old

;=== Timelimit defined by Created or Modified or Accessed date



DelDaysOld (Directory) (Days_Old) [CREATED|MODIFIED|ACCESSED] [INI=Path_to_IniFile] [QUIET] [NOCONFIRM]

    Root directory to start from

    DaysOld # days, or Y:d:H:m:s format (Y:d:H:m:s)

    CREATED|MODIFIED|ACCESSED – Days old based on which specified time stamp (DEFAULT=MODIFIED)

    INI=Path_to_IniFile – Redirects to alternate INI file. If specified, other command parameters are ignored.

    QUIET – Suppress completed message box

    NOCONFIRM – Bypass confirmation prompt

    DelDaysOld 14 ACCESSED INI=C:\Files2Delete.ini

To process multiple directories or specify a filemask other than *.*, use .INI to configure
the options.
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
By: bkeadle
Sep 7, 2006
3:43 pm
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management IT Security Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Supported Troubleshooting Workflow