What is your use case for searching the system for a file?
In general this is a bad idea. If used, it should either have an extremely narrow scope (search only 1 folder) if used in relevance. If it is used in ActionScript, it can be a bit more broad because you can make it only happen once, but even then it isn’t a great idea.
###Partial answer to Part 1:
You can use both relevance and commands in an Action to do queries of the system, but you can only run relevance (which is read only) on a system outside of an Action or through relevance substitution.