Question Finding folders on PC with fewer than five files inside

mikeymikec

Lifer
May 19, 2011
17,739
9,651
136
... of course? If you create a folder, how many files will be inside it: Zero.

Have you omitted some vital context here?
 

King Mustard

Member
Jan 5, 2002
157
0
76
A family member has a massive photos directory that contains hundreds of folders, each containing images.

She wants to tidy the directory by only keeping folders that have five or more images in them.

For folders with less than five images inside, she wants to move those images to the root then delete the folders, but I can do those manually once we identify the folders in question.
 

WelshBloke

Lifer
Jan 12, 2005
30,518
8,190
136
You could use something like Treesize to show the folders by size and start with the smallest?
It's not exactly what you wanted but it would probably get you to the same result.
 
  • Like
Reactions: King Mustard