Skip to content

Commit fa9cb7e

Browse files
committed
audioSplit: Add empty folder check
1 parent 46dfc61 commit fa9cb7e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

audioSplitter.ps1

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ write-host "`r"
2828
#grab the items in the input folder
2929
$videos = Get-ChildItem -Path $inputVids -Recurse
3030

31+
if ($videos.count -eq 0) {
32+
write-host "There are no files in the input folder. Exiting!" -ForegroundColor Red
33+
psPause
34+
exit
35+
}
36+
3137
write-host "`n Number of videos:" $videos.count -ForegroundColor Yellow
3238
Write-host "overwriting output files: $ow"
3339
write-host "Ready to go? If not, exit or hit ctrl+c"

0 commit comments

Comments
 (0)