Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: How to list empty files using cmd.ext

08 Jul 2015   #1

Windows 7 Home Premium 64bit
How to list empty files using cmd.ext


I am in need of listing all the empty folders on a subfolder. Cmd.exe seems like it would be the perfect route to go.

In the past, I have listed all the files in a directory to a text file.

I am looking to do the same with empty folders, as I need to know if I'm missing audio, video, or pictures, that were supposed to be there. And then replace accordingly.

So something like sending a list of empty folders to a file named empty.txt is along the lines that I'd like.

If anybody can help. Please do.


My System SpecsSystem Spec
09 Jul 2015   #2

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan

Hi Rkariff,

Here's some batch script that may help you--
set start_location="C:\Users\%USERNAME%"
set empty.txt_location="C:\Users\%USERNAME%\Desktop\empty.txt"
    @for /f "delims=" %%I in (' dir /a:d /b /s %START_LOCATION% ') do @(
        dir /a /b "%%~fI" 2>NUL | find /v "" >NUL || (
            echo "%%~fI"
My System SpecsSystem Spec

 How to list empty files using cmd.ext

Thread Tools

Similar help and support threads
Thread Forum
Empty Features List
Hello, i have empty features list, this is log from CheckSUR and i dont know how to fix this issues: ================================= Checking System Update Readiness. Binary Version 6.1.7601.22471 Package Version 26.0 2015-06-25 20:19 Checking Windows Servicing Packages
Windows Updates & Activation
Uninstall or remove program list empty
Hi, i went to remove some programs and after i open uninstall or change a program in my computer it opens me only two last program that i install today but no others programs. whats problem? why i cant see all installed programs? i have windows 7 ulitmate SP1 last update
Program list empty after malware, how to restore?
Hello, my superhandy program list is empty after a malware attack on my pc. The malware is gone. But left my program list from the Start button empty afterwards. It has folders in it, but gives (empty) when i click on them instead of the shortcuts to programs. Even my calculator is gone! :cry:...
General Discussion
Favorites List Empty in IE8
I am running windows 7 Home Premium, ie 8 Version 8.0.7601.17514. My favorites are in Users/Owner and contains all the shortcuts. However when in ie, favorites are empty. Created a new user, deleted links and favorites from Owner and copied links and favorites from New User to Owner. Still...
Browsers & Mail
empty recent photo list
Hi all Is that possible to clean the recent photo list on Windows live photo gallery? Thank you very much!
Music, Pictures & Video

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:55.
Twitter Facebook Google+