07-12-2013 05:35 AM
I posted my comment to a solved thread: http://forums.ni.com/t5/NI-TestStand/searchfiles/td-p/2364238/page/2
and I haven't got a solution. So I post it now in a new thread.
Is it possible to search for substring in a file name useing the Engine.SearchFiles method? I know, that there is a SearchOptions_RegExpr, but I could not figure out, how to search for file names. I can find files, which contain particular expressions, variables etc. but not file names.
So, is it anyhow possible?
Solved! Go to Solution.
07-12-2013 09:08 AM
Do you mean that you want file files with a particular name, or that you want to find particular file names used within a file? Those are two very different things. If you just want to find files with a particular name why not just use Windows file explorer?
-Doug
07-12-2013 10:00 AM
Hi Doug,
I just want to find particular file names. But I want to do it programmatically, so I can't use the windows explorer. Or is there any trick to use that without user interaction???
Madottati
07-12-2013 04:20 PM
SearchFiles is only for searching within files. Take a look at the FindFiles sequence in:
<TestStand>\Components\Tools\ForEach.seq
This sequence searches for all files under a directory tree using direct calls to the WIN32 APIs. You could probably just call this sequence directly to do what you are asking.
-Doug