How to format the output(s) of foldersize() in "#,0" style?
Thank you.
How to Format foldersize()?
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: How to Format foldersize()?
Is this possible?
Code: Select all
::text foldersize(,format(<d>, "#00000"));-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to Format foldersize()?
no
format() formats the output of foldersize(), not the other way round...
format() formats the output of foldersize(), not the other way round...
One of my scripts helped you out? Please donate via Paypal
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to Format foldersize()?
::text format(foldersize(, "<r>"),"#0,0000");
One of my scripts helped you out? Please donate via Paypal
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: How to Format foldersize()?
HI Highend,
Wow! Yours works brilliantly. Thanks a lot.
But how to apply format () to:
Wow! Yours works brilliantly. Thanks a lot.
But how to apply format () to:
Code: Select all
::foldersize(,"<d>, <f>, <b>");-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to Format foldersize()?
Code: Select all
$properties = foldersize(,"<d>, <f>, <b>");
$bytes = gettoken($properties, 3, ", ");
$bytes = format(gettoken($bytes, 1, " "),"#0,0000") . " " . gettoken($bytes, 2, " ");
text $bytes;One of my scripts helped you out? Please donate via Paypal
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: How to Format foldersize()?
Hi Highend,
Thanks to your tip, I modify the script for my learning exercise.
Thank for your help.
Thanks to your tip, I modify the script for my learning exercise.
Thank for your help.
Code: Select all
$properties = foldersize(,"<d>, <f>, <b>");
$text = "Folder Count: " . format(gettoken($properties, 1, ", "),"000") . <crlf>."File Count: " . format(gettoken($properties, 2, ", "),"#,000.00") . <crlf> .
"Bytes: " . format(gettoken($properties, 3, " "),"#,0.0000") . gettoken($properties, 4, " ");
text $text;
XYplorer Beta Club