Skip to content

Instantly share code, notes, and snippets.

@apharp
Created April 21, 2019 04:16
Show Gist options
  • Save apharp/4da94c1b83aa89d558afb672991d9e67 to your computer and use it in GitHub Desktop.
Save apharp/4da94c1b83aa89d558afb672991d9e67 to your computer and use it in GitHub Desktop.
Extract RAR files in torrents upon completion.
param (
$TPath
)
$rarFile = Get-ChildItem "$TPath\*" -Include "*.rar"
if ($rarFile.count -gt 0)
{
$rarFullName = $TPath + "\" + $rarFile.Name
& "C:\Program Files\7-Zip\7z.exe" e "$rarFullName" -o"$TPath"
}
@apharp
Copy link
Author

apharp commented Apr 21, 2019

Super simple script to extract rar files when torrent complete.

Here is the command to run within QBitorrent
powershell "E:\preprocessed\TorrentUnrar.ps1" -TPath "%F"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment