Batch file to find the size of the folders and Files

Discussion in 'Windows - General discussion' started by Sriganesh, Jan 23, 2008.

  1. Sriganesh

    Sriganesh Member

    Joined:
    Jan 23, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    Hello Friends,

    I appreciate if someone can help me in writing a batch file to find the files & folders which are utilizing more disk space.

    I have one below but it is not working. Can anyone please helpme.

    echo off
    cd w:\docume~1
    if exist w:\d.txt del w:\d.txt
    dir /a:d /x /b >w:\d.txt
    for /f %%G in (w:\d.txt) DO del w:\docume~1\%%G\LOCALS~1\TEMPOR~1\content.ie5\*.* /s /f /q
    for /f %%G in (w:\d.txt) DO rd w:\docume~1\%%G\LOCALS~1\TEMPOR~1\content.ie5 /s /q
    for /f %%G in (w:\d.txt) DO del w:\docume~1\%%G\LOCALS~1\TEMP\*.* /s /f /q
    for /f %%G in (w:\d.txt) DO del w:\docume~1\%%G\APPLIC~1\Sun\Java\Deployment\javaws\cache*.* /s /f /q
    del w:\d.txt
    del *.bmc /s /q /f
    del GalContacts.db /s /q /f
    cd\
    cd w:\WINNT\repair\RegBack
    del w:\WINNT\repair\RegBack\*.* /s /q /f[/color][/color]
     
  2. Sriganesh

    Sriganesh Member

    Joined:
    Jan 23, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    is there any way i can do this. it would be convenient because i would like to find the the file and folder with the higest size on multiple servers and it would be easier to just click on a single file.


    Thanks,
    Sree
     

Share This Page