Windows Vista Forums

remove all empty folders

  1. #1


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 08:00 PM
    italy

    remove all empty folders

    I have another problem from a lot of days.
    Makings an experiment I made a mistake and I've created a lot of empty folders (several thousands). I'd like to know how I can delete them if they don't contain files.
    Thanks.

      My System SpecsSystem Spec

  2.   


  3. #2
    locoeng's Avatar

    Flim-Flam Man
    Join Date : Jun 2008
    Charleston SC
    Posts : 445
    Vista Ultimate 32/64 bit
    Local Time: 09:00 PM
    usa us south carolina

     

    Re: remove all empty folders

    I've not tried this software, but you could give it a shot to see if it does what you want... RED ~ jonasjohn.de: remove empty directories (freeware for windows)

      My System SpecsSystem Spec

  4. #3


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 08:00 PM
    italy

      Thread Starter

    Re: remove all empty folders

    Wow. It's solved my problem. Great sw. Thank you very much.
    However if someone can give me a solution with powershell it would be appreciate.

      My System SpecsSystem Spec

  5. #4
    locoeng's Avatar

    Flim-Flam Man
    Join Date : Jun 2008
    Charleston SC
    Posts : 445
    Vista Ultimate 32/64 bit
    Local Time: 09:00 PM
    usa us south carolina

     

    Re: remove all empty folders

    Glad it worked for you.

      My System SpecsSystem Spec

  6. #5


    /\/\o\/\/ [MVP] Guest

    Re: remove all empty folders

    for a powershell solution see:

    http://www.microsoft.com/technet/scr...pstip0530.mspx

    Greetings /\/\o\/\/
    http://thePowerShellGuy.com

    "sardinian_guy" wrote:

    >
    > Wow. It's solved my problem. Great sw. Thank you very much.
    > However if someone can give me a solution with powershell it would be
    > appreciate.
    >
    >
    > --
    > sardinian_guy
    >

      My System SpecsSystem Spec

  7. #6


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 08:00 PM
    italy

      Thread Starter

    Re: remove all empty folders

    I was sure that it was possible to solve with powershell.
    Thank you very much and I give you my compliments for your great knowledge. I found your solutions everywhere in the web.

      My System SpecsSystem Spec

  8. #7


    Kiron Guest

    Re: remove all empty folders

    # remove empty folders
    ls <path> -r -fo | ? {$_.psIsContainer} |
    sort fullName -des | ? {!(ls $_.fullName -fo)} | ri

    Check out this thread to see why it's better to sort them in descending order
    http://groups.google.com/group/micro...41347ebae682fb

    --
    Kiron

      My System SpecsSystem Spec

  9. #8


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 08:00 PM
    italy

      Thread Starter

    Re: remove all empty folders

    Thanks again, even for the link!

      My System SpecsSystem Spec


remove all empty folders
Similar Threads
Thread Forum
Remove empty folders PowerShell
Solved How to remove empty Vol. mixer bars? Sound & Audio
Remove empty folders in C:\Windows\Temp ?? Vista General
file folder icons display non-empty folders as empty Vista file management
Can I Permanently Remove Empty Removable Drives? Vista hardware & devices