Skip to content

Instantly share code, notes, and snippets.

@zsoumya
Created April 2, 2021 04:15
Show Gist options
  • Save zsoumya/b33cf8c3c64dea3a51568e99dae593b7 to your computer and use it in GitHub Desktop.
Save zsoumya/b33cf8c3c64dea3a51568e99dae593b7 to your computer and use it in GitHub Desktop.
Movie Count By Source
$sources = @(
'F:\Movies\720p',
'F:\Movies\Bengali',
'F:\Movies\Ero',
'F:\Movies\Indian',
'F:\Movies\LQ',
'H:\Movies\1080p',
'H:\Movies\Collections',
'H:\Movies\Unwatched2',
'J:\Movies\4K',
'J:\Movies\Unwatched1',
'F:\Movies\Temp',
'H:\Movies\Temp',
'J:\Movies\Temp'
)
$sources | ForEach-Object -Process {
[PSCustomObject] @{
Folder = $_
Count = (Get-ChildItem -Path $_ -Directory -Depth 0 -Exclude '.deletedByTMM').Length
}
} | Format-Table -Autosize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment