KB-41276: Search for a file passing part of its name as a parameter.

Question

I want to use the FindFirstFile function to search for a file, passing as a parameter only a part of the filename. Is it possible?

Solution

Yes, it is. To do so, just use an asterisk (*).

Example of script:

tag001 = FindFirstFile("C:/Name_of_file*")

In this example, it could retrieve results such as Name_of_File1.txt, Name_of_File222.bmp, etc., regardless of its extension.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *