Search found 3 matches

by paulo
06 Jul 2009 15:12
Forum: DOS Batch Forum
Topic: Batch File To Display Directory Size
Replies: 4
Views: 13656

Well... This works, but not as expected. The nested loop iterates the command-line current directory, not the top-level for directory. :S I also tried this, but doesn't work too: @echo off setLocal EnableDelayedExpansion set /a sum=0 FOR /d %%D in (%1) do ( FOR /R %%I IN (%%D\*) ...
by paulo
06 Jul 2009 10:40
Forum: DOS Batch Forum
Topic: Batch File To Display Directory Size
Replies: 4
Views: 13656

Batch File To Display Directory Size

I grabbed the below code from: m @echo off setLocal EnableDelayedExpansion set /a sum=0 for /d %%D in (%1) do ( FOR /R %%D %%I IN (*) DO ( set /a value=%%~zI/1024 set /a sum=!sum!+!value! ) ) echo Size is: !sum! k When I try to run this code I get the %I was unexpecte...
by paulo
06 Jul 2009 08:26
Forum: DOS Batch Forum
Topic: String: left-justification with spaces
Replies: 1
Views: 4352

String: left-justification with spaces

There is a way to left-justify a string with spaces? :?