Subfolders of Folder List?

(imported topic written by PatNOregon)

So I’ve seen posts on using the descendants to get a sum of files from a top folder, but what if I just want a list of the subfolders?

Like Folders of Folder?

Thanks!

(imported comment written by brolly3391)

Welcome PatNOregon,

That is an easy one.

Names of Folders of Folder “c:”

Cheers,

Brolly

(imported comment written by jessewk)

If you want to descend through all folders, you can use any of these queries. The usual caveats about using the descendants inspector apply. Basically, don’t use it in the relevance of a Fixlet/Task/Baseline/Analysis/Action (in an action script is OK), and set the evaluation interval for any properties you create that use the descendants inspector to ‘Once a day’ or less frequently.

This will give you the full pathnames:

Q: unique values of pathnames of parent folders of descendants of folder “c:\documents and settings\Administrator\Desktop”

This will give you the path relative to the folder you pass in:

Q: following texts of firsts (“c:\documents and settings\Administrator\Desktop” as lowercase) of (it as lowercase) of unique values of pathnames of parent folders of descendants of folder “c:\documents and settings\Administrator\Desktop”

This will just give you the folder names (no path):

Q: unique values of names of parent folders of descendants of folder “c:\documents and settings\Administrator\Desktop”

(imported comment written by PatNOregon)

Thanks guys, so now that I can do this I wanted to combine it with the size check I’ve seen in other posts.

Basically:

IF (exists folder “c:\drivers”) then

give me a list of all the subfolder path names as string & " - " & sum of sizes of each of those folders.

I keep getting singluar expression needed. What am I missing?

(imported comment written by Doug_Coburn)

The actual properties you were returning need to be singular expression. In this you are trying to get ‘sum’ and ‘value’ back from the expresion. I used the following query.

q: (sum of sizes of descendants of it as string & " - " & unique value of names of parent folders of descendants of it as string) of folder "c:\documents and settings\Administrator\Desktop\includes"
A: 358 - includes
T: 1.660 ms

Doug

(imported comment written by Doug_Coburn)

Helps if I post the whole expression,

q: IF (exists folder “c:\Documents and Settings\Administrator\Desktop\includes”) then ((sum of sizes of descendants of it as string & " - " & unique value of names of parent folders of descendants of it as string) of folder “c:\documents and settings\Administrator\Desktop\includes”) else "N/A"
A: 358 - includes
T: 2.697 ms