2011-11-15, 11:19
cliffe Wrote:Ahh, ok, looks like a problem with the way I coded the error checking, not having been tested much on Windows.
If you would like to help this get fixed, could you please edit sorttv.pl and add this:
Code:my $test = system("rar e -o$over '$arfile' '$dest'");
print "Return code: $test\n";
at line 1105 (just before "if(num_found_in_list(system("rar e -o$over '$arfile' '$dest'"), @errors) eq "FALSE") {")
And then tell me what that prints out next time you run it.
This is the output after I added those lines.
Code:
C:\scripts>sorttv2.bat
C:\scripts>perl c:\scripts\sorttv2\sorttv.pl
SortTV
~~~~~~
Sorting:
From D:/test/
TV episodes into D:/test/
everything else into D:/test/
12:14:42, 15-10-2011
WARN: could not create directory: /D:/test/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/
an.idiot.abroad.s02e07.hdtv.xvid-tla.rar (extracted by SortTV) (Invalid argument
), extracting to D:/test/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/
'rar' is not recognized as an internal or external command,
operable program or batch file.
Return code: 256
'rar' is not recognized as an internal or external command,
operable program or batch file.
RAR: extracting D:/test/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/an.idiot.abroad.s02
e07.hdtv.xvid-tla.rar into D:/test/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r00
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r01
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r02
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r03
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r04
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r05
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r06
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r07
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r08
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r09
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r10
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r11
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r12
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r13
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r14
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r15
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r16
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r17
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.rar
C:\scripts>
Now there was some confusion. You said to add the code on line 1105, but before "if(num_found_in_list(system("rar e -o$over '$arfile' '$dest'"), @errors) eq "FALSE") {".
"if(num_found_in_list(system("rar e -o$over '$arfile' '$dest'"), @errors) eq "FALSE") {" is on line 1093. Line 1105 is the "}" of line 1104 which is "out("std", "WARN: the rar / 7zip program could not be found, not decompressing $arfile\n");".
Should I have added the code after or inside of the "} esle {"?