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
rkariff

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

Hello.

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.

Thanks.


My System SpecsSystem Spec
.
09 Jul 2015   #2
Pyprohly

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

Hi Rkariff,

Here's some batch script that may help you--
Code:
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"
        )
    )
) > %EMPTY.TXT_LOCATION%
My System SpecsSystem Spec
Reply

 How to list empty files using cmd.ext




Thread Tools Search this Thread
Search this Thread:

Advanced Search




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
Software
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
bcdedit list is empty? -- How to edit startup?
Hello, When I go to bcdedit, there are no entries at all. When I go to msconfig, then to the boot tab, there are also no entries at all. I want to alter the boot settings (setting the amount of memory lower (dont ask)), but I cant find windows 7 in any boot related program... Where to I...
General Discussion


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 13:09.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App