Auto srr recovery, sfv check and cleanup?

So, I'm attempting to create a file type action thta does the following.
On double click of a srr file it should:

  1. rebuild the file set (srr clicked_file.srr)
    once that is completed
  2. sfv check (fsum -c -d"full path of the clicked file" fullpath*.sfv) this I can't get to run using fsum, so I also either need another command line sfv checker that accepts wildcard filenames as input or the filename used inthe sfv check is the filename of the srr file with a sfv extension instead of a srr extension.
    once that is verified I want to
  3. delete, if exists, *.avi and *.mkv in the fullpath folder.

So, can anyone tell me if this is even possible and if so, give some pointers as to how to do it? :slight_smile:

You can start with the following:

<?xml version="1.0"?> <button display="both" icon_size="large" label_pos="right"> <label>Test Button</label> <tip>Test Button</tip> <icon1>#pathfield</icon1> <function type="batch"> <instruction>@leavedoswindowopen </instruction> <instruction>@nofilenamequoting </instruction> <instruction>srr &quot;{f}&quot;</instruction> <instruction>fsum -c -d &quot;{f}&quot; &quot;{f|noext}.sfv&quot;</instruction> <instruction>delete *.(avi|mkv)</instruction> </function> </button>
And see where that gets you... The button assumes you've got the paths to the srr and fsum executables in your system search PATH. If not, then you'll need to specify the full path to each of those utilities in the button.

Note: the button also assumes the scenario you mentioned:

I tossed together something running as a MS-DOS Batch function uppon left click.

srr {file} -y for /F %%a in ('dir /b *.sfv') do set FileName=%%~na.sfv "e:\Program Files (x86)\cfv\cfv.exe" -Q -p {sourcepath$} -f %FileName% IF %ERRORLEVEL% == 0 ( del {sourcepath$}\*.mkv ) ELSE ( echo SFV failed. pause )

This does what I needed but I must say what you got there looks cleaner but it does of course not have any sort of check on if the SFV scan was completed or not.

Thanks anyway. :slight_smile: