Author Topic: Auto unrar - to a different folder with filtering, i.e. no mkv files  (Read 3765 times)

Offline asdfsafd

  • Contributor
  • ***
  • Posts: 4
I'd like to decide which files to be unrared to a different folder (in my case a NAS) and have exceptions, i.e. big files which I have to convert first manually (for my stupid xbox360 ,-))

Any chance to have that small feature?

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Auto unrar - to a different folder with filtering, i.e. no mkv files
« Reply #1 on: October 10, 2010, 06:54:07 pm »
Could you expand on the idea a bit, plz, as it's not quite clear what you mean. Concrete examples can help. ;)

Offline asdfsafd

  • Contributor
  • ***
  • Posts: 4
Re: Auto unrar - to a different folder with filtering, i.e. no mkv files
« Reply #2 on: October 10, 2010, 07:23:57 pm »
Wow, fast reply, thanks for that.

Well, After altbinz downloaded a file and extracted that, let's say: .mkv-file, it is now being pushed to my NAS with the "Par2->Unrar->Autounrar to a different folder"-Option. I don't want that for very big mkv-Files.

I'd like to set a filter here, that files with a certain extension (*mkv) or with a certain file-size are NOT being pushed to another folder or to my network folder.

I can tell altbinz to move certain files with the "Move to unrar folder"-Option, but I would like to block certain files from being unrared to a different folder.

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Auto unrar - to a different folder with filtering, i.e. no mkv files
« Reply #3 on: October 10, 2010, 10:56:50 pm »
I see, thanks, that's much clearer. You could probably do this already with a tiny bit of scripting and the Execute Command on Completion option. In fact, I do something similar: unrar to a common root, then run a script that decides on final destination based on various things.

In your case, you might run something like this Powershell script:

Code: [Select]

$unrardir = C:\my_unrar_dir
$nasdir = N:\my_nas_dir

$files = get-childitem $unrardir\* -include "*.avi", "*.mkv"
foreach ($file in $files)
{
  if (($file.extension -match ".mkv") -and ($file.length -gt 2GB)) 
  {
    ## large file, process it here ##
  }
  else
  {
    ## small file, move it to nas ##
    move-item $file $nasdir 
  }
}