forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Folder Size?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
MondoNuovo
Valued Newbie


Joined: 09 Jul 2001
Posts: 44
Location: Italy

PostPosted: Wed Jun 19, 2002 5:53 pm    Post subject: Folder Size? Reply with quote

Hi all,
I wanted to know whether making VDS read the dimensions of a folder is possible?

Thanks
Daniele
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Jun 19, 2002 6:11 pm    Post subject: Reply with quote

Hi Daniele!

You might wanna check this thread out:
http://www.vdsworld.com/forum/viewtopic.php?t=22

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
MondoNuovo
Valued Newbie


Joined: 09 Jul 2001
Posts: 44
Location: Italy

PostPosted: Wed Jun 19, 2002 6:30 pm    Post subject: Reply with quote

Thanks Dr. Dread!!
Back to top
View user's profile Send private message Send e-mail
DanTheMan
Contributor
Contributor


Joined: 15 Mar 2002
Posts: 56
Location: Sweden

PostPosted: Wed Jun 19, 2002 8:42 pm    Post subject: Reply with quote

Hi folks!
Found a bug i Mac:s program, on Line 251. There might be a problem
when running on very large directories. @div() command get an Error 25
when (%%bytes) get over 999999999 bytes. Not Mac:s fault but
right now we can fix it with a dirty one.

change Line 251: %%bytes = @div(%%bytes, 1000)
to: %%bytes = @substr(%%bytes,1,-3)

Thanks Mac for your nice piece of code, it's a little bit slow but it's
works fine.!

/Dan
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Jun 19, 2002 10:35 pm    Post subject: Reply with quote

Thanks Dan,

I changed the posted code to include your fix.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Jun 20, 2002 5:50 am    Post subject: Reply with quote

I think the floating point functions of VDS can handle larger values, so maybe try @FDIV().

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Jun 21, 2002 1:21 am    Post subject: Reply with quote

You're correct (as usual) Tommy,

@fdiv() will handle much larger values, but using
"@format(%%bytes, .0)" rounds them instead of just
removing the fraction. I used @div() to avoid this,
because rounding upward with several figures could
result in more bytes than the drive size (if it's nearly
full)...
______________________________________________________________________________________________________________________________________________________
Code:

rem -- 15 digits --
%%bytes = 999999999999999

if @greater(%%bytes, 999)
   %%bytes1 = @fdiv(%%bytes, 1000)"   (15 digits plus a period)"
   %%bytes2 = @format(@fdiv(%%bytes, 1000), .0)"   (rounds to 13 digits)"
   %%bytes3 = @substr(%%bytes,1,-3)"   (fraction removed to 12 digits)"@tab()
else
   %%bytes = @fdiv(%%bytes, 1000)
end

INFO BYTES= %%bytes"   (15 digits)"@cr()@cr()FDIV= %%bytes1@cr()@cr()Formatted FDIV= %%bytes2@cr()@cr()SUBSTR= %%bytes3


Cheers, Mac

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group