Windows Vista Forums

remove all empty folders
  1. #1


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 04:22 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. #2
    locoeng's Avatar

    Flim-Flam Man
    Join Date : Jun 2008
    Charleston SC
    Posts : 445
    Vista Ultimate 32/64 bit
    Local Time: 05:22 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

  3. #3


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 04:22 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

  4. #4
    locoeng's Avatar

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

     

    Re: remove all empty folders

    Glad it worked for you.

      My System SpecsSystem Spec

  5. #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

  6. #6


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 04:22 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

  7. #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

  8. #8


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

      Thread Starter

    Re: remove all empty folders

    Thanks again, even for the link!

      My System SpecsSystem Spec

remove all empty folders problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove empty folders brhessel PowerShell 8 19 May 2010
Solved How to remove empty Vol. mixer bars? prukeyhi Sound & Audio 12 01 Nov 2009
Remove empty folders in C:\Windows\Temp ?? PerryFeral Vista General 10 01 Feb 2009
file folder icons display non-empty folders as empty nodaway Vista file management 1 26 Dec 2007
Can I Permanently Remove Empty Removable Drives? J. Danniel Vista hardware & devices 6 03 Jun 2007