nother question I'm not really understanding as I've stepped through the code and don't see why this is happening..

when i run through the script, the writes to the screen show the information as it should be so I know that my loops are correct BUT when I try to write that information to a file, ONLY the very first extension gets reported.

code: Code:
If $open = 0
$folders = dirplus($root,'/ad /s1')
for each $folder in $folders
$folder.path ?
$ = WriteLine(1,$folder.path+',')
for each $e in $ext
$files = dirplus($folder.path,'/s /a-d /f '+$e)
for each $f in $files
$folsize = $folsize + $f.size
next
$e + ": " + $folsize ?
$ = WriteLine(1,0+$folsize+',')
$folsize = 0
next
$ = WriteLine(1,@CRLF)
next
Endif



File Output:
Quote:

,mp3,avi,jpg,gif,wmv,msi,
C:\Documents and Settings\cameron.wilson\Desktop\Fairchild Netlogon,000000
C:\Documents and Settings\cameron.wilson\Desktop\Fairchild Netlogon\kix,000000
C:\Documents and Settings\cameron.wilson\Desktop\KiX,000000
C:\Documents and Settings\cameron.wilson\Desktop\KiX\Archive,000000
C:\Documents and Settings\cameron.wilson\Desktop\Release,000000
C:\Documents and Settings\cameron.wilson\Desktop\test,325728400029017485822464



Screen Output
Quote:

C:\Documents and Settings\cameron.wilson\Desktop\Fairchild Netlogon
mp3:
avi: 0
jpg: 0
gif: 0
wmv: 0
msi: 0
C:\Documents and Settings\cameron.wilson\Desktop\Fairchild Netlogon\kix
mp3: 0
avi: 0
jpg: 0
gif: 0
wmv: 0
msi: 0
C:\Documents and Settings\cameron.wilson\Desktop\KiX
mp3: 0
avi: 0
jpg: 0
gif: 0
wmv: 0
msi: 0
C:\Documents and Settings\cameron.wilson\Desktop\KiX\Archive
mp3: 0
avi: 0
jpg: 0
gif: 0
wmv: 0
msi: 0
C:\Documents and Settings\cameron.wilson\Desktop\Release
mp3: 0
avi: 0
jpg: 0
gif: 0
wmv: 0
msi: 0
C:\Documents and Settings\cameron.wilson\Desktop\test
mp3: 3257284
avi: 0
jpg: 0
gif: 0
wmv: 2901748
msi: 5822464
Press any key to exit




** For some reason, it's only writing the mp3 entries into the file and then it stops writing. Any ideas?


Edited by thepip3r (2006-02-11 10:07 PM)