This retrieved value is working OK for me in an analysis I’ve written.
if exists ((files whose (name of it as string as lowercase contains “.exe” ) of folders of folder “C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5” )) then (concatenation “,” of ((location of it as string & “” & name of it as string & " - " & size of it as string & " bytes - " & modification time of it as string) of file whose (name of it as string as lowercase contains “.exe” ) of folders of folder “C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5” )) else “No”
Some computers, though, show an in the retrieved value. From what I can tell those computers have many files that match this expression. So, I’m guessing that putting the ENTIRE path name in the retrieved value is not a good thing. I’m banging my head against the wall trying to figure out how to return just the directory the file exists in, instead of the entire path.
The problem might be happening when the expression lists the names and locations of the files. The expression being used is:
then ( … ) of
file
whose ( … ) of folders of folder “C:\Documents and Settings\Default User…”
It should probably be:
then ( … ) of
files
whose ( … ) of folders of folder “C:\Documents and Settings\Default User…”
The first expression will cause a “Singular expression refers to non-unique object” if there is more than one file that ends with .exe, which seems to match the problem you were having.
Thanks Brian. I’m going to give it a try. A question, though. I’m trying to truncate the patch down to something like \filename.exe. That would help the output when someone is trying to read the information from the console or when running a report. Any idea on how to do that?
There’s the property 'parent folder of ’ that returns the enclosing folder of a file or folder, so you could maybe try changing ‘location of it’ to ‘name of parent folder of it’