Re: Open Files in Directory based on a List of Variable FilenamesThank you, Jarmo. It works.
Re: Open Files in Directory based on a List of Variable FilenamesJim, the file name is "Jan" or "Feb" or "Mar"
Re: Open Files in Directory based on a List of Variable FilenamesI had to do couple of modifications.
1. Contains should have list as first argument and the filelist should not be in quotes
2. You have to concatenate .jmp to filelist
This slightly modified modified example should give you an idea what to modify:
folder = "C:\Program Files\SAS\JMPEA\17\Samples\Data\";
filename = {"AdverseR", "Air Traffic", "Abrasion"};
filelist = Files In Directory(folder);
For(i = 1, i <= N Items(filename), i++,
If(Contains(filelist, filename[i] ||".jmp"),
Open(folder || filename[i] || ".jmp")
);
);Re: Open Files in Directory based on a List of Variable FilenamesAre the actual file names you are looking for, named "Jan" or "Feb" or "Mar"? or, are you looking for those month abbreviations to be part of the file name?
A sample of what the actual filenames are would be helpful.
Open Files in Directory based on a List of Variable FilenamesHi all,
I have a list of filename. This list of filename is variable and change from to time. I want to match these file name to the files available in a directory. If match , open the files.
I write below code and run it. It does not work.
Need guidance here.
folder = "C:\savefile\";
filename ={"Jan", "Feb", "Mar"};
filelist= Files In Directory(folder);
For(i=1, i<= N items(filename), i++,
If (Contains(filename[i], "filelist"),
Open (folder || filename[i] ||".jmp"))
);Advanced Statistical ModelingData AccessData Blending and CleanupDesign of ExperimentsQuality and Process Engineering