http://glynor.com/files/MCUtilities/MCUtilities-1060.exeMCFileRemover 1.0.5 (4/12/2014)
1. NEW: --DeleteSidecars command line option also deletes Sidecar files (.xml, .jpg, and .properties) when used with the --DeleteFiles
command line option (it is otherwise ignored).
WARNING: After I reconsidered this a bit, I guess I have to make the test for sidecars more complicated, as this could be pretty disastrous if you give it a bad source filename.
So, the way this works now is:
1. It takes the original source filename (without the extension) and searches for [Filename]* in the current directory (it is not recursive).
2. Then it filters that list and finds only files that have the extensions .jpg, .properties (SageTV makes these and I have a bunch orphaned), and .xml.
That works brilliantly as long as your source filename is something like:
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0.mp4Or whatever.
But, if you (probably accidentally) gave it a source filename like
d.mp4Then ALL jpgs (and xml and properties files) in the source directory that start with "d" would match, because it searches against "d*".
That's no good. I'll have to add much more complex logic, looking for what the matching sidecar filenames should be. The problem is that I have a bunch of different patterns, so I have to do them each individually. I need it to find these files (using my example name above):
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0_mp4_JRSidecar.xml
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0_ts_JRSidecar.xml
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0.jpg
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0.ts.properties
DoratheExplorer-S04E21-BabyJaguarsRoar-20907827-0.mp4.propertiesThe .properties files use the original filename extension and then add the .properties extension to that. The JRSidecars use underscores around the source extension. And the jpgs use just the original source filename. And, worse, I do want it to find the TS versions, because since I auto-convert to MP4, those "orphaned" TS versions of the sidecars get orphaned behind (and my record directory is FULL of them, hence me wanting this feature too).
So, this version is totally usable. BUT, be aware of how it works. It could be dangerous if your source filename is non-unique or very short.
I'll think about it and there will be a new version that is safer.
EDIT: I pulled this version. Please use 1.0.6 instead (linked in next post).