How can I get the following relevance to list all of the files that meet the criteria. This statement returns: “Error: Singular expression refers to non-unique object.”
following text of first “=” of variables whose (it contains “xxx.com”) of (find files “*.url” of (descendant folders of folder “c:\users”))
Please note the error I encountered when using find files on a system.
I couldn’t find a .url file that is formatted like an .ini file so I had to improvise but I think the answer to your problem is to just pluralize both “text” and “first” in your relevance string:
following texts of firsts "=" of variables whose (it contains "xxx.com") of (find files "*.url" of (descendant folders of folder "c:\users"))
If that doesn’t work – could you post example contents of a .url file configured with variables in it?
descendants of folders "desktop" of folders of folder "C:\users"
All of this should come with a standard warning that you can easily grind the client to a halt if the client has a lot of content on their desktop. If someone has a computer backup or something the user’s desktop could easily have 50,000 folders on it with who knows how many shortcuts and misc content
Searching with relevance is expensive so use it carefully.
following texts of firsts “=” of variables whose (it contains “xxx.com”) of (find files “*.url” of (descendants of folders “desktop” of folders of folder “C:\users”))
I am getting the error: The property ‘find files of ’ is not defined
following texts of firsts “=” of variables whose (it contains “apriabpm.apria.com”) of (find files “*.url” of (descendant folders of “desktop” of folders of folder “C:\users”))
following texts of firsts “=” of variables whose (it contains “apriabpm.apria.com”) of (find files “*.url” of (descendant folders of folder “desktop” of folders of folder “C:\users”))
Really calling me out on my bad relevance tonight!
Try this:
following texts of firsts “=” of variables whose (it contains “apriabpm.apria.com”) of (find files “*.url” of (descendant folders of folders “desktop” of folders of folder “C:\users”))
@mbartosh
Figured it out! It skips the links at the root of the desktop folder.
(descendant folders of it; it) of folders "desktop" of folders of folder "C:\users"
So…
following texts of firsts "=" of variables whose (it contains "apriabpm.apria.com") of (find files "*.url" of ((descendant folders of it; it) of folders "desktop" of folders of folder "C:\users"))
@jgstew
Well, we aren’t really using find files with descendants we are using find files with descendant folders.
Using find files with descendant folders is significantly faster on my machine than using a whose it on descendants…
Q: (find files "*.url" of (descendant folders of folders "desktop" of folders of folder "C:\users"))
A: ....
T: 24.027 ms
Q: descendants whose (name of it as lowercase ends with ".url") of folders "desktop" of folders of folder "C:\users"
A: .......
T: 133.999 ms
I imagine that the find files is done in native code and is thus optimized while the whose it clause requires the work to be done in relevance and isn’t as optimized.
Here are the timings depending on the total number of files being searched over: