Last active
August 26, 2020 14:34
-
-
Save khaosx/4910f33253df9832e69b03900c809732 to your computer and use it in GitHub Desktop.
Copies any downloaded remuxes to the holding folder for processing
This file contains hidden or 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
# 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