DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Load file using a wildcard.

Hello, I am trying to open a file with a name like: "1000_Test_1.csv"

 

The problem exists because the "_1.csv" can contain any number, which I do not care about. The main this I need make sure of is that the "1000_Test" section is correct. Is there any way to use a wildcard when calling the file?

An example of the code I am currently using is listed below.

 

Thanks.

 

 

Call DataFileLoad("C:\Users\Me\Somewhere\DIAdem Tests\Folde\" & run_num & "_Test*","csv")

0 Kudos
Message 1 of 2
(4,399 Views)
Option Explicit

dim entries : entries = DirListGet("C:\temp", "1000_Test_*.csv", "filename", "FullFilenames")
If IsArray(entries) Then
  dim entry : for each entry in entries
    MsgBox entry
    Call DataFileLoad(entry,"csv")
  Next
end if

You can use code like this

0 Kudos
Message 2 of 2
(4,382 Views)