By default, the Find Files feature performs a simple LS command on the underlying directory structure.
To return file names that contain the text only once, you can call command-line shell tools like GREP on Unix-based operating systems. Then, you can use the UNIQUE function in MATLAB, with the 'first' parameter argument, on the string array returned by GREP to satisfy this requirement.
For more information, please take a look at the system documentation for GREP on Unix machines, or consider using a third-party tool like Windows Grep (see below) on Windows machines:
<http://www.wingrep.com/>
Best Answer