Page 1 of 1 1
Topic Options
#168802 - 2006-10-03 05:26 PM GETFILESIZE() >>> GETSIZE() with wildcard support
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Would be useful to in a very simple way get the total filesize of more than one file(s), directories, or even a drive.

Edited by masken (2006-10-13 05:59 PM)
_________________________
The tart is out there

Top
#168803 - 2006-10-03 07:33 PM Re: GETFILESIZE() wildcard support
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Please provide an example of what you're thinking of.

Do you mean sort of like a DIR Size of a folder or a given file extension?

Not sure what you're thinking of here.

Top
#168804 - 2006-10-03 08:34 PM Re: GETFILESIZE() wildcard support
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Getfilesize("%WINDIR%\KB*.log") for example

or an even better one but isn't supported in any other wildcard-functions I guess:

Getfilesize("%WINDIR%\KB######.log")


Edited by masken (2006-10-03 08:36 PM)

Top
#168805 - 2006-10-03 08:47 PM Re: GETFILESIZE() wildcard support
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Thanks for the clarification.

I won't bother to post a work around as I'm sure you already know how to do it and this is a suggestion to enable such tasks a little easier for scripters.

Top
#168806 - 2006-10-04 09:12 AM Re: GETFILESIZE() wildcard support
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
you're absolutely right as usual doc

Edited by masken (2006-10-04 09:13 AM)

Top
#168807 - 2006-10-05 03:45 PM Re: GETFILESIZE() wildcard support *DELETED*
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Post deleted by Björn
Top
#168808 - 2006-10-05 03:57 PM Re: GETFILESIZE() wildcard support
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

total filesize of more than one file.



Top
#168809 - 2006-10-05 06:27 PM Re: GETFILESIZE() wildcard support
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
hmm, interesting request...

a workaround...

Code:

$kixFiles = dirplus('c:\kix','/a-d /s /f kix')
for each $file in $kixfiles
$totalSize = $totalSize + $file.size
next

? $totalSize


Top
#168810 - 2006-10-05 09:06 PM Re: GETFILESIZE() wildcard support
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Bryce I know you're busy but...

Quote:

I won't bother to post a work around as I'm sure you already know how to do it



Top
#168811 - 2006-10-06 02:02 AM Re: GETFILESIZE() wildcard support
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Workarounds certainly have their place in the suggestion forum. They serve to either support or dismiss the suggestion. A complex workaround the former and a simple workaround the latter.
Top
#168812 - 2006-10-06 02:09 AM Re: GETFILESIZE() wildcard support
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
I don't disagree. If the person was new to KiXtart and didn't understand how then yes providing them with a work-around would be appropriate.

I know that Masken knows how to code it already himself so I didn't provide one as I didn't see the need.
I've also not seen anyone else post asking how to do it, so again didn't see a reason to write up code for it.


This is now up to about 11 posts when it could have probably ended at 3 or 4 so Ruud wouldn't need to read all of them since that is often what you ask us to do anyways is curtail our posts in Beta and Suggestions I thought.


Top
#168813 - 2006-10-06 02:24 AM Re: GETFILESIZE() wildcard support
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... I then count three of your low value posts that Ruud now needs to wade through. Your response to Bryce was out of place as bryce showed how simple the workaround is. Your posts also demand they be answered with more low value posts. If anyone adds anything of value after our ramblings, there is a big chance Ruud had already hit the back button and it would go unread.
Top
#168814 - 2006-10-13 05:51 PM Re: GETFILESIZE() wildcard support
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Changed the topic to: GETFILESIZE() >>> GETSIZE() with wildcard support

Really, it would be great to have a built-in function that could get the size of any path, with or without wildcards. Including both files, folders, or even drives... This would also go beyond the FileSystemObject's possibilities.

In this thread:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=143492

Ruud mentions folder support, but it doesn't seem to be working in 4.53?


Edited by masken (2006-10-13 06:04 PM)

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.064 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org