Quantcast
Channel: Total Commander
Viewing all articles
Browse latest Browse all 4179

Total Commander (English) • Re: search for folders that contain 3 or more files with the same extension

$
0
0
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



Viewing all articles
Browse latest Browse all 4179

Trending Articles


Maganda Quotes – tagalog Quotes – Inggit Quotes


Re:Mutton Pies (lleechef)


Sapos para colorear


OFW quotes : Pinoy Tagalog Quotes


Long Distance Relationship Tagalog Love Quotes


Patama tagalog quotes – Move On Quotes


Tropa Quotes


RE: Mutton Pies (frankie241)


EASY COME, EASY GO


FORECLOSURE OF REAL ESTATE MORTGAGE


Mga Patama sa mga Nagmamahal the Best Tagalog love quotes for you


Girasoles para colorear


tagalog love Quotes – Tiwala Quotes


“Tado” Jimenez Quotes Collections Online


Patama Quotes – Tanga love tagalog quotes


Ligaw Quotes – Courting Quotes – Sweet Tagalog Quotes


Hugot Lines 2020 Patama : ML Edition


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 10.7.1 by Vimeo.com, Inc.


Pokemon para colorear