Finding folders on PC with fewer than five files inside


King Mustard

Well-known member
Local time
12:30 PM
Posts
27
OS
Windows 11
Is this possible?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 7 7800X3D
    Motherboard
    ASRock B650M Pro RS
    Memory
    32 GB DDR5-6000
    Graphics Card(s)
    NVIDIA GeForce RTX 3080
    Monitor(s) Displays
    42" LG C4 OLED, 42" LG C2 OLED
    Screen Resolution
    2x 4K (100% scaling)
    PSU
    Corsair RM850x
    Case
    Cooler Master MasterBox NR400
    Keyboard
    Tecware Phantom RGB
    Mouse
    Logitech G305
    Internet Speed
    1 Gbps down, 1 Gbps up
    Browser
    Google Chrome

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & 400MB Orange-fr
    Browser
    Edge Canary- Firefox Nightly-Chrome Dev
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Of course, using the command line and outputting to a file but why?
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.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 7 7800X3D
    Motherboard
    ASRock B650M Pro RS
    Memory
    32 GB DDR5-6000
    Graphics Card(s)
    NVIDIA GeForce RTX 3080
    Monitor(s) Displays
    42" LG C4 OLED, 42" LG C2 OLED
    Screen Resolution
    2x 4K (100% scaling)
    PSU
    Corsair RM850x
    Case
    Cooler Master MasterBox NR400
    Keyboard
    Tecware Phantom RGB
    Mouse
    Logitech G305
    Internet Speed
    1 Gbps down, 1 Gbps up
    Browser
    Google Chrome
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.
This can be done thru a script that would require time and testing.
How are your scripting skills?

I am unaware of any utilities that could handle something that specific.
Others might chime in.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & 400MB Orange-fr
    Browser
    Edge Canary- Firefox Nightly-Chrome Dev
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM

Latest Support Threads

Back
Top Bottom