Get name and Folder Size

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Locked
CookieMonster

Get name and Folder Size

Post by CookieMonster »

I'm trying to understand the get() function. As I want to get just the name of a folder and the size of a folder.

Code: Select all

get($selFolder,"SelectedItemsNames",<path 2>);
For this line, the name is returned in the error, but also; no such info ?

1024mb
Posts: 205
Joined: 14 Dec 2018 23:26

Re: Get name and Folder Size

Post by 1024mb »

name

Code: Select all

get("curitem", "base");
size

Code: Select all

get("BytesSelected", ,2);
for size you need to enable show folder sizes otherwise 0 will be returned.

Though I don't understand what you are trying to do, if the path is stored in a variable then why don't you store the base name in a variable too using <curbase>?
Also you can't just use anything for the "info" parameter in get(), you have to use one of the listed options.

CookieMonster

Re: Get name and Folder Size

Post by CookieMonster »

Code: Select all

$selFolder = <curfolder>;
 $subSelFolder = listfolder($selFolder,*,2,<crlf>)
 foreach($newI,$subSelFolder,<crlf>,"folList"){
 get("BytesSelected",,2)

The input folder is being placed in a variable, then forEach of the folders within the input folder I want it to list the totals bytes for each folder ? The line before the first line in the snippet is just a ifElse with an input() function so I didn't post it. Instead what is returned is some code, instead of the total bytes for each folder within the selected folder ?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Get name and Folder Size

Post by highend »

<curfolder> = wrong variable
"folList"?
No assignment of bytesselected to a variable, no counting, wrong format
Probably no selected folders at all
Missing semicolons

RTFM!!!
One of my scripts helped you out? Please donate via Paypal

CookieMonster

Re: Get name and Folder Size

Post by CookieMonster »

You know Highland, the least you could do is not reply. You never want to give any amount of time in helping even if it's a tiny bit, although at this point I don't want help from you. Instead you just love being this bitter angry person towards me for the longest time. We will never meet each other, although that probably is the only positive.

Is it that impossible for you to simply not reply to what I write because everything I write bothers you; or maybe you bother yourself. Whatever it is, as a normal human does, they just ignore the person. That can be done online as well, it's not difficult, but your little fingers can't help themselves, so no matter how much you swear at me, curse at me; try to get powers in numbers, and you may succeed as it's on those who listen to you. It really is on you.

You can choose to, write; I don't know nothing, I don't know how to do nothing, your the smartest human in the world blah blah blah ! If that what makes you feel better, go ahead and say all that crap to me; write it !

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Get name and Folder Size

Post by highend »

Instead of taking the time to complain about the help you've got you should have invested it into reading the docs.
You didn't. As always!

Oh, you didn't get a fully fledged script that solves your problem but instead a list of things that you did wrong (and again: that you refuse to lookup why they are wrong) so that you actually learn something (after having 10 years of time and countless resources here in the forum)?

Let me finally quote yourself:
Good Citizens Don't Think.
You're the best citizen of all...
One of my scripts helped you out? Please donate via Paypal

Locked