After prompting the user to select a text file, the file is opened and a variable is created based on the site name contained in this text data filename as follows
dt.rawdata = Open (
Pick File( ......
)
);
// Create string that is filename
dtname = dt.rawdata << Get Name;
// Create variable called siteid that removes just the site name from the filename
If( Word( 1, dtname, "_" ) == "UC",
siteid = "UC_" || Word( 2, dtname, "_" ),
siteid = Word( 1, dtname, "_" )
);
What I'm struggling with now is how to open a JMP data file whose name contains the siteid just determined. There are about 40 .xls and .jmp data files in a directory and I'm trying to open the only JMP file that contains siteid in the filename as follows
where ? is a wildcard for the text string that follows LTEM Data. The filenames follow the format siteid LTEM Data, yyyy - YTD.jmp where yyyy refers to starting year and varies depending on the site id.
dt.metplots = Open(
"$dir_metplots/" || siteid || " LTEM Data?" || ".jmp"
);
Is there a wildcard that can be used for this or is there some other clever way to accomplish this? Thanks in advance.