D
doofus
@echo off
rem start dirsize.exe.lnk
setlocal
for /f "tokens=*" %%a in ( 'dir /w /s %1 ^| findstr "File(s)"') do @set
info=%%a
echo Directory %1 - %info%
Hi,
When I run the foregoing code in a file dirsize1.bat, I used to get the
size of the entire directory including subdirectories, recursively.
Now, instead, I get "The directory name is invalid", no matter what.
I was given the code on this newsgroup, and never understood how it
worked.
http://tinyurl.com/hx27 --link to original post on google groups.
I've discovered that if I go 'dir /w /s . | findstr "File(s)"', I also
get this same error message.
I recall increasing the environment size some time ago in order to get
another dos utility to work. Would that have made any difference?
I'm posting this here is the hope that one of you kind experts might be
able to see right away what the problem is or suggest an alternative.
The batch file was very useful, but if I can't get it to work, I'll just
find a work around.
I just don't know what I've done wrong.
Will appreciate any help. Yours truly is completely mystified.
My OS is Win2k.
Thanks.
rem start dirsize.exe.lnk
setlocal
for /f "tokens=*" %%a in ( 'dir /w /s %1 ^| findstr "File(s)"') do @set
info=%%a
echo Directory %1 - %info%
Hi,
When I run the foregoing code in a file dirsize1.bat, I used to get the
size of the entire directory including subdirectories, recursively.
Now, instead, I get "The directory name is invalid", no matter what.
I was given the code on this newsgroup, and never understood how it
worked.
http://tinyurl.com/hx27 --link to original post on google groups.
I've discovered that if I go 'dir /w /s . | findstr "File(s)"', I also
get this same error message.
I recall increasing the environment size some time ago in order to get
another dos utility to work. Would that have made any difference?
I'm posting this here is the hope that one of you kind experts might be
able to see right away what the problem is or suggest an alternative.
The batch file was very useful, but if I can't get it to work, I'll just
find a work around.
I just don't know what I've done wrong.
Will appreciate any help. Yours truly is completely mystified.
My OS is Win2k.
Thanks.