Skip to content

Instantly share code, notes, and snippets.

View itoleck's full-sized avatar
🏠
Working from home

Chad Schultz itoleck

🏠
Working from home
View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@redfellow
redfellow / handbrake.ps1
Last active December 17, 2023 22:38
Powershell script to batch-encode recursively, using a custom handbrake preset
$filelist = Get-ChildItem "F:\path\to\vids\" -filter *.avi -recurse
$num = $filelist | measure
$filecount = $num.count
$i = 0;
ForEach ($file in $filelist)
{
$i++;
$oldfile = $file.DirectoryName + "\" + $file.BaseName + $file.Extension;