FileSharper is a C#/WPF file search and processing application for developers and power users. It allows you to search for files matching certain conditions (length, content, etc.) and take action on them, for instance replacing certain text content or adding a file to a zip archive. It provides a GUI alternative to command-line workflows based on UNIX tools like find, grep, sed, sort, etc. Search conditions currently include:
File Processors currently include:
For a demo, see this video or this video on YouTube. To try it out yourself, grab a possibly-somewhat-recent installer here. For a tutorial of how to use FileSharper, see Using FileSharper.
FileSharper is designed to be quickly extended with new functionality. It's published under the MIT license so you can grab the source and add your own domain-specific code. The GUI is data-driven, so you don't have to write any UI code to add a new search condition or file processor.
You can extend FileSharper's functionality by writing classes that implement any of the four main interfaces:
When you add a class implementing one of these interfaces to the FileSharperCore project or a project of your own that you add to the FileSharper solution, it will be found at runtime via reflection and added to the appropriate picklist in the FileSharper UI. The FileSharper UI is used to create "searches" that have exactly one file source, zero or one condition (which can be an arbitrary composition of other conditions), any number of field sources, and any number of processors that run when a file is tested or matched.
If you're adding file sources, conditions, field sources, or processors, I recommend inheriting from the base classes FileSourceBase, ConditionBase, FieldSourceBase, and SingleFileProcessorBase (or ProcessorBase if you know what you're doing).
If you download FileSharper and start adding classes that would benefit others, consider submitting pull requests so I can pull them in and make FileSharper better for everyone. Right now the code is marked as (c) Andrew Vardeman, but if I actually get contributions I'll adopt a contributor's license agreement so it can become more of a community project.
Caveat Emptor: FileSharper is currently roughly alpha quality. I'm slowly adding tests, starting with the various Processors, as they run the greatest risk of damaging your files.
Caveat #2: FileSharper's handling of text encodings other than ASCII/UTF-8 is largely untested. I'd recommend caution when running processors that overwrite the source text file. You will probably want to do a test run with a file you've backed up before trusting it to do the right thing.