Skip to main content
Help us improve Python packaging – donate today!

Identifies files with improper age

Project Description

| _ __ ___ __| |_ _____ ___ __| | |
| | '__/ _ \/ _` \ \ /\ / / _ \ / _ \ / _` | |
| | | | __/ (_| |\ V V / (_) | (_) | (_| | |
| |_| \___|\__,_| \_/\_/ \___/ \___/ \__,_| |
| William Farmer |

Redwood is a tool for users to check, document, and delete files in directory
trees based on age. Redwood will log every step that the process completes as
well as every file that is older (or newer) than a user specified age.

Redwood will generate two files as it's run, a logfile as well as a report. The
logfile is appended each time redwood is run unless the -c argument is present.
The report is generated at the end of each program iteration. The purpose of the
report is to identify which files were flagged the last time redwood was run
withough having to parse the logfile. Be careful though, unless the report is
saved to a different location, redwood will overwrite it the next time it's run.

For help at the command line:

Usage: ./ <options>

-h, --help show this help message and exit
-c, --clean Clean logfile first?
Target Directory(s). If you wish
to include multiple directories, seperate
them using multiple -d arguments
-e, --empty Flag empty directories as well?
--delete Delete flagged files?
--force Whether or not to ask for confirmation when
deleting files. If this flag is included,
it will NOT ask for confirmation.
-l LOGFILE, --logfile=LOGFILE
Directory for the logfile
Which config file to use
-r REPORT, --report=REPORT
Directory for the report
--reverse Whether or not to pick files that are newer
or older than the specified time. If this
option is included, any files that are newer
than the time set in .redwoodrc will be flagged
or deleted, depending on other options.
-t TRASH, --trash=TRASH
Location for trash. If this flag is present
redwood will move old files to this directory
instead of deleting them.

The file .redwoodrc provides two main functions in configuring redwood's
behavior. The first function is that of setting the age of files. This is done
through the first line of the file which should look something like this:


Any line after this will act as a filter for redwood, i.e. any directories
listed here will be ignored. The way this works is through the program
determining if the current working directory for the program starts with the
line from .redwoodrc These lines should look like this:


Keep in mind that absolute paths need to be used, relative paths will NOT work.

The config file will also ignore any lines starting with #, so feel free to

A test harness is provided with redwood to ensure program functionality.
To run,
$ ./

To see a demonstration of how it works, enter:

$ ./dir_creation
$ ./ -d /<FULL PATH>/redwood/bin/level0/ -e --delete --force -t /<FULL PATH>/redwood/bin/trash/

This will generate files, and then scan/delete the old ones. In this example,
the files will actually end up in the trash directory under bin/

Release history Release notifications

History Node


This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
Redwoodpy-1.1.tar.gz (6.2 kB) Copy SHA256 hash SHA256 Source None Sep 19, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page