The currently implemented filters are:
- Date (always taken into account)
- Starts with numeric
- Name is a guid
To extend with another filter:
- Add methods to Filters.cs following same pattern as existing (returns IEnumerable of FileInfo for files; IEnumerable of string for folders).
- Add parameter metadata for the new filter parameter in AppParams.cs.PARAM_STRINGS
- Add a "mode" property for the new filter in AppParams.cs (Like existing NumericMode).
- Add a method to read the new param from the command line and set the new property you created above (like existing SetNumericMode).
- Update the help text that prints when no params or bad params are passed to the utility in Program.cs
Test before using, of course, but I hope it's of use to somebody. If you just want the utility, get it here; if you want the code, it's here.
No comments:
Post a Comment