If I get your question right you want to check for existence of a folder whose name contains a value, “W3” in your case. For your example try this:
(exists folder whose (name of it contains "W3") of folder "c:\inetpub\logs\logfiles") as string | "N/A"
Note that I used the pipe to deal with the case when the containing folder does not exist as you would get something like : “Error: Singular expression refers to nonexistent object.”
If instead you are just looking for a folder name inside another folder than use this simpler form:
(exists folder "W3" of folder "c:\inetpub\logs\logfiles") as string | "N/A"
OK, so you are using it as relevance in a Fixlet. The expected return type is boolean while the example I gave you returns a string. Change it to the following:
(exists folder whose (name of it contains "W3") of folder "c:\inetpub\logs\logfiles")
q: pathnames of folders of folder "c:\inetpub\logs"
A: c:\inetpub\logs\LogFiles
I: plural string
q: exists folder "c:\inetpub\logs\logfiles"
A: True
I: singular boolean
q: exists folder whose (name of it = "logfiles") of folder "c:\inetpub\logs"
A: False
I: singular boolean
Note that the folder name is LogFiles, but you can get different results when using different properties to do the comparision.
For Windows, because the file system is not case-sensitive, the second example above returns true.
This would not work for Linux because the file system is case-sensitive.
The third example returns false because it is comparing string values (which are case-sensitive).