Windows Explorer-- Determining memory contained in a subdi..

katie

Distinguished
Apr 25, 2004
56
0
18,630
Archived from groups: microsoft.public.win2000.general (More info?)

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.
 
G

Guest

Guest
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

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
 

katie

Distinguished
Apr 25, 2004
56
0
18,630
Archived from groups: microsoft.public.win2000.general (More info?)

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
>
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

I wrote my own utility program that does just that & its available on the
microsoft.public.dotnet.language.vb newsgroup. Its compiled & there is also
the source code

Crouchie1998
BA (HONS) MCP MCSE
 
G

Guest

Guest
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:DDBED9CA-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
> >
> >
> >
> >
 

katie

Distinguished
Apr 25, 2004
56
0
18,630
Archived from groups: microsoft.public.win2000.general (More info?)

I apologize for not knowing this, but I went to the newsgroup below and
wasn't sure exactly where to look for this code you are talking about. I'm
sort of a newsgroup beginner...

Once in that newsgroup, how do I go about finding the code?

"Crouchie1998" wrote:

> I wrote my own utility program that does just that & its available on the
> microsoft.public.dotnet.language.vb newsgroup. Its compiled & there is also
> the source code
>
> Crouchie1998
> BA (HONS) MCP MCSE
>
>
>
 

dl

Distinguished
Apr 2, 2004
1,126
0
19,280
Archived from groups: microsoft.public.win2000.general (More info?)

Try using default newsreader, outlook express. Then its easier to track your
posts.As it is you've started a new thread, and no one here knows what your
talking about.

"Katie" <Katie@discussions.microsoft.com> wrote in message
news:968D5954-71EF-410B-93B3-D901A7B81187@microsoft.com...
> I apologize for not knowing this, but I went to the newsgroup below and
> wasn't sure exactly where to look for this code you are talking about.
I'm
> sort of a newsgroup beginner...
>
> Once in that newsgroup, how do I go about finding the code?
>
> "Crouchie1998" wrote:
>
> > I wrote my own utility program that does just that & its available on
the
> > microsoft.public.dotnet.language.vb newsgroup. Its compiled & there is
also
> > the source code
> >
> > Crouchie1998
> > BA (HONS) MCP MCSE
> >
> >
> >