search folders that contain 3 (or more) files with the same extension?
for example I want to search for all folders that have at least 3 .flac files
Not with TC alone.
I took a look and came up with this:
Open a PowerShell console in the "main"-folder.
Try something like this:
$FOLDERS = Get-ChildItem d:\directory | ?{$_.PSISContainer}
or
$FOLDERS = GCI -Recurse | ?{$_.PSISContainer} # the current folder
Next paste in:
Code:
$OUT=''ForEach ($FLD in $FOLDERS){Set-Location $FLD.FullName"`n`nDEBUG FOLDER: $($FLD.FullName) "GCI -File | Group -Property Extension |Select-Object Name, Count |ForEach{if ($_.Name -eq '.tXt' -AND $_.Count -gt 2){"YES"; $OUT+=$($FLD.FullName)+"`r`n"}}}"`n`nRESULT:`n$OUT"
EXPORT the result to a text file:
$OUT | Set-Content C:\Temp\_myLoadlist.txt
Next use TC's LOADLIST to load that list of folders into TC.
For more details about this LOADLIST see:
viewtopic.php?p=457717#p457717 (Search folders that contain txt files that contains a specific word)
Statistics: Posted by Stefan2 — 2024-07-21, 10:22 UTC