Created
March 26, 2024 17:56
-
-
Save mmodrow/dc9b76ba43ca5f98b23602d599d80a1b to your computer and use it in GitHub Desktop.
Remove Video that had no (proper) audio and was stripped by ConvertTo-SilentVideo.ps1
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
$silentVideos = Get-ChildItem *.mp4 -Include @("*_noAudio*", "*_h264*") | Where-Object { $_.length -gt 0 } | |
foreach ($silentVideo in $silentVideos) { | |
$silentVideoName = ($silentVideo.basename.replace("_noAudio", "").replace("_h264", "")) + ".avi" | |
if (Test-Path($silentVideoName)) { | |
Write-Host ( "removing " + $silentVideoName) | |
Remove-Item $silentVideoName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment