Make script that looks for gaps just in case

This commit is contained in:
Isaac Shoebottom 2024-05-30 14:01:49 -03:00
parent 0164ccbd67
commit 13f386d0ab

16
look-for-holes.ps1 Normal file
View File

@ -0,0 +1,16 @@
$files = (Get-ChildItem ./* -Include *.mp4).BaseName
# Write-Host $files
$numbers = @()
foreach ($file in $files) {
$numbers += [int]($file)
}
# Write-Host $numbers
if ($numbers.Length -ne $files.Length) {
for($i = 0; $i -lt $numbers.Length; $i++) {
if (($numbers[$i]+1) -ne $numbers[$i+1]) {
Write-Host $numbers[$i]
}
}
} else {
Write-Host "No gaps found"
}