Created
January 7, 2017 21:20
-
-
Save tillig/668948d521c9a3a69344142b5e13daf5 to your computer and use it in GitHub Desktop.
Report to query the Handbrake queue and dump a local copy of the current status (sync the report via OneDrive for remote access to queue status)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$reportFile = ".\QueueStatus.txt" | |
$handbrakeDir = Join-Path ([Environment]::GetFolderPath("ApplicationData")) -ChildPath "Handbrake" | |
[XML]$queue = Get-ChildItem -Path $handbrakeDir -Filter "hb_queue*.xml" | | |
Sort-Object -Property LastWriteTime -Descending | | |
Select-Object -First 1 | | |
Get-Content | |
$queue.ArrayOfQueueTask.QueueTask | | |
Select-Object -Property @{n='Status';e={$_.Status}},@{n='Source';e={$_.Task.Source}},@{n='Destination';e={$_.Task.Destination}} | | |
Format-Table -AutoSize | | |
Out-String -Width 4096 | | |
Out-File $reportFile -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment