Page 1 of 1

NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Wed Jul 15, 2015 11:05 pm
by Tanamur
Hi All -

I am not an experienced user of NBPro and am looking for some documentation/examples on setting up Options>Filters>RAR Archives.

What I want to do is after d/l and AutoPAR, delete ALL RAR set files with the exception of the main video file, subtitles and nfo file.

The NBP6.60B4163 defaults have me most of the way there. Options>Settings>AutoPAR Options handles the deletion of RARs and PARs when ticked. Enabling/ticking post UnRAR Filter>RAR Archives allows me (Options>Filters>RAR Archives) to add things like [.]sfv and [.]srr "Reject/Accept"???? This is where my semantics are getting turned around based on the defaults and my varying results.

I am particularly having trouble deleting the "sample" files without deleting the primary video file as well when configured as

Reject if > Filename Contains > sample

Thanks for any help in advance!

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Wed Jul 15, 2015 11:17 pm
by Quade
What I want to do is after d/l and AutoPAR, delete ALL RAR set files with the exception of the main video file, subtitles and nfo file.


Reject if > Filename Contains > sample


This should work unless the actual video file has "sample" in it too.

You can add a filename reject for "sample" and if it finds "sample" in any part of the filename, it'll delete it. The regular expression of a word is just the word. You only need special characters to do complicated things.

[.]SFV$ - and this pattern works for any file extension you want to delete.

The $ just means "require it to be on the end of the filename". That prevents the ".sfv" somewhere in the body of the filename from matching. You really don't even need the [.] "sfv$" would also work. I like [.]SFV$ because it's pretty precise and shouldn't have any false positives.

[.] = "." . has special meaning in regular expressions so, you have to escape it.
SFV = just text. You can use any extension.
$ = "end of the filename". In a filename filter.

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Thu Jul 16, 2015 2:11 am
by Tanamur
Many thanks Quade for the quick and clear response. I really appreciate the REGEX tips on the precise use of $.

I am just running some tests on a slow connection now and will let you know how it has worked out.

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Mon Aug 03, 2015 2:34 am
by Tanamur
Hi @Quade - So after a bit of testing I can conclude that not all RAR sets are the same and one RAR set filter does not fit all.

I have had good overall success with the examples you gave me. Sometimes however, subtitle *.idx and *.sub files are RARs packed in RARs so a RAR file gets deposited from the download folder to the unRAR folder. Sometimes it is unarchived but almost always the RAR remains in the unRAR folder. Not a huge deal and difficult to address I would think with separate download & unRAR folders.

I was having a problem with the *.PAR2 files not being deleted from the download folder after unRAR so I added [.]par2$ to the filter and this deletes them in most cases. Shouldn't this be handled by Options>Settings>AutoPAR for the deletion of RARs and PARs when ticked?

Thanks again.

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Mon Aug 03, 2015 10:09 am
by TBlack
You could try this RE String as a Filename Reject in your UnRar Filter:

Sample([0-9]{1,5})?\.(avi|mkv|mp4|m4v|par2|srr|vol)

This should handle any file that has Sample anywhere in the string, followed by an optional string for numbers up to 5 numbers, and seven possible suffixes i.e. "sample12345.par2". This section here ([0-9]{1,5})? adds any number from 1 to 5 digits, i.e. Sample2 up to Sample99999, and the Question Mark at the end says that everything in the parens preceding the ? is an option and doesn't have to be there i.e. Sample., then a the \. for the period in the filename, and then seven different options for the suffix. The Vertical Bar | is the Alternate Symbol for RE.

If you just want to do filename suffixes, try this string in Filename Reject: (\.bat|\.com|\.exe|\.flv|\.html?|\.pif|\.scr|\.sfv|\.srr)$
You can see the $ as Quade mentioned....works very well. This is the string that I currently use in my UnRar Filename Filter. In your case, you could use:

(\.bat|\.com|\.exe|\.flv|\.html?|\.pif|\.scr|\.sfv|\.srr|\.par2)$

Give this a try.

Thanks

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Wed Aug 05, 2015 4:41 am
by Tanamur
Hi Tom - Thanks for these suggestions and I have added them to my RAR Filter for testing. I'll get back to you after a couple days of testing. Much appreciated!

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Wed Aug 12, 2015 3:02 am
by Tanamur
Hi Tom & Quade - All is working very smoothly here and NB is tidying up nicely after autoUNRAR with the following two entries:

Reject if Filename Contains sample([0-9]{1,5})?\.(avi|mkv|mp4|m4v|par2|srr|vol)
Reject if Filename Contains (\.bat|\.com|\.exe|\.flv|\.html?|\.pif|\.scr|\.sfv|\.srr|\.par2)$

Thanks again!

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Wed Aug 12, 2015 9:05 am
by TBlack
Welcome

There is a little redundancy here though if interested.

sample([0-9]{1,5})?\.(avi|mkv|mp4|m4v|par2|srr|vol) [the underlined entries are dups, because the other line will catch them]

(\.bat|\.com|\.exe|\.flv|\.html?|\.pif|\.scr|\.sfv|\.srr|\.par2)$

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Fri Aug 14, 2015 1:55 am
by Tanamur
Thanks Tom for noting the redundancy and I removed it to avoid any problems.

One small thing regarding "sample" files. I have noticed that if the file begins with "sample-" it is not being deleted. For example sample-blah.blah.s05e04.hdtv.x264-blah.mp4. Is the "-" after sample- causing a problem?

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Fri Aug 14, 2015 7:17 am
by Quade
I'm not clear why you're just not using "sample" with no additional RE bits. Would be interesting to see whether this would catch your "leading sample" issue.

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Fri Aug 14, 2015 8:33 am
by TBlack
Tanamur wrote:Reject if > Filename Contains > sample


Yes, you could use just "sample" as long as you NEVER want anything with "sample" in the filename string. I have used a similar string for other filenames and NB does a great job of catching them.

My thought process is to stay away from blanket or general methods so as to not get into trouble. I also try various RE strings to better learn RE.

Thanks

Re: NBP6.60B4163 - Options>Filters>RAR Arch Documentation

PostPosted: Fri Aug 14, 2015 9:09 am
by Quade
I tend to go for the broadest, simplest match that doesn't catch things I really want. I can't imagine wanting anything with "Sample" in it at this point. The more complex the RE the more things like this "not filter if sample is at the beginning" things creep in.

There's no right or wrong. I just prefer simple.