Archived from groups: microsoft.public.win2000.general (
More info?)
Put it in a New Text File and rename it to jerolds.bat. Then open a command prompt and in the location where this file is type jerolds.
--
George Hester
_________________________________
"Katie" <Katie@discussions.microsoft.com> wrote in message news
DBED9CA-AEDF-4362-971E-3E64B8577F4D@microsoft.com...
> How do I go about implementing this code?
>
> "Jerold Schulman" wrote:
>
> > On Mon, 18 Apr 2005 11:54:02 -0700, "Katie" <Katie@discussions.microsoft.com> wrote:
> >
> > >I want to clean up a directory. I was wondering if there is a way to list all
> > >the subdirectories contained in the directory and the corresponding amount of
> > >space taken up by each subdirectory.
> >
> > @echo off
> > if {%1}=={} @echo Syntax CleanUpDir Folder&goto :EOF
> > setlocal
> > set folder=%1
> > @echo Directory:%1
> > for /f "Tokens=*" %%a in ('dir /a /ad /b /s %folder%') do (
> > for /f "Tokens=2,3" %%b in ('dir /a "%%a"^|FIND "File(s)"') do @echo "%%a","%%c"
> > )
> > endlocal
> >
> >
> >
> >