Need batch file to cycle through directories & delete empty ones

Posted on 2006-03-28
Last Modified: 2012-05-07
Hi folks,

I have a client who has a file server with thousands upon thousands of folders.  Over the course of time, duplicate folders or slightly renamed folders were created that have no contents.  I want to quickly identify and delete the empty directories.  

Can someone help me with the batch file commands to do this? Or, is there a freeware or low-cost software program that does this?

Thanks for your help.
Question by:charlietou
    LVL 15

    Accepted Solution

    LVL 3

    Author Comment

    Nice trick!

    The directory went from 9,500+ folders down to 6500+ with this procedure.

    Thanks for the tip.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now