This is a little utility to list and remove specific file types from a directory.
It has three functions, which are:
- Check a directory for all unique file extensions it contains.
- List all files with the extensions specified in source, essentially a dry-run.
- Remove all files with the matched extensions
To change what file extensions are searched for, edit the array $filetypes.
- ./cleanDirectory.sh repository/ check
- ./cleanDirectory.sh repository/ list
- ./cleanDirectory.sh repository/ remove