Snippets

Luke Powers mkclean on current folder

Created by Luke Powers
Get-ChildItem "." -Filter *.mkv | 
Foreach-Object {
    $mkvfilein = $_.FullName
    $mkvfileout = $mkvfilein + '-new'
    Write-Output "Working on $mkvfilein ...."
    & 'C:\Users\Luke Powers\Downloads\mkclean-0.8.10-win64\mkclean.exe' "--optimize" "$mkvfilein" "$mkvfileout"
    Write-Output "Wrote temp file $mkvfileout"
    Remove-Item "$mkvfilein"
    Rename-Item "$mkvfileout" -NewName "$mkvfilein"
    Write-Output "Moved temp file to original file."
    Write-Output "Finished!" ""
} 

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.