[Gambas-user] Size of Directorys....

Benoit Minisini gambas at ...2...
Sat Aug 23 22:02:52 CEST 2003


Le Mercredi 20 Août 2003 14:47, Stephan Gans a écrit :
> I need the size of directorys within variables.
> Any idea how I get the results of du into one or more variables ?
>
> gambas-user at lists.sourceforge.net schrieb am 20.08.03 13:54:06:
> > what if u exec "du"
> >
> > mephisto75 at ...20... wrote:
> > >Does somebody know an easy way to find out the size of directorys ?
> > >Or do I have to read out  every file in the directory and its
> > > subdirectorys an add the sizes, that would be ugly.
> > >
> > >Thanx
> > >

Try something like that:

sTemp = Temp$()
SHELL "du ... > " & sTemp WAIT ' Replace ... with the right options
iSize = Val(File.Load(sTemp))

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list