Skip to content

Instantly share code, notes, and snippets.

@khaosx
Last active August 26, 2020 14:34
Show Gist options
  • Save khaosx/4910f33253df9832e69b03900c809732 to your computer and use it in GitHub Desktop.
Save khaosx/4910f33253df9832e69b03900c809732 to your computer and use it in GitHub Desktop.
Copies any downloaded remuxes to the holding folder for processing
# find-remuxes-to-convert.ps1
#
# Copyright 2020 - K. Austin Newman
# Version: 1.0
# Copies any downloaded remuxes to the holding folder for processing
#
## Define variables
$dirMediaLibrary1 = "\\carbon\media\movies"
$dirMediaLibrary2 = "\\carbon\media2\movies"
$dirMediaLibrary3 = "\\carbon\download\complete"
$dirDestination = "d:\holding"
## Begin Processing
$aPaths = $dirMediaLibrary1,$dirMediaLibrary2,$dirMediaLibrary3
foreach ( $dir in $aPaths ) {
$fArray = Get-ChildItem -recurse $dir -include *remux*.mkv -File
foreach ($element in $fArray){
Write-Output "Processing $element"
Copy-Item "$element" -Destination "$dirDestination"
}
}
Write-Output "No files remain to be processed. Exiting..."
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment