03-13-2012 04:36 AM
Hi
I'm lookng for a way to find all files in a directory which part of filename contains a specific string.
e.g.:
string = hello
files;
- 1hello2.txt
- 22he45.txt
- gehello42353.txt, ....
The result should be either an index or the complete filename that matches. In the example I'd found index 0 and 2, or 1hello2.txt and gehello42353.txt.
Actually I have the list of the files with the "recursive list.vi".
Any suggestions are welcome.
Thanks for your precious help
Yves
Solved! Go to Solution.
03-13-2012 04:53 AM - edited 03-13-2012 05:03 AM
You can use List Folder - function with *hello* -pattern.
From there you get filenames, which include that specific pattern.
If you allready have list of files:
- use Scan string for tokens in a for loop and if token index != -1, then you can add that array index to the list.
I´m sure there are better ways to do this, but nothing I can come up with quickly.