The code below changes the raw file to txt file. However, I want to have the code auto grab the file named "2022-09-07_003_DR06 PRE-TEST_HORIZONTAL_NOM_" instead of a new dialog box opening up. I have files that are basically the same but named POST instead of PRE or VERTICAL instead of HORIZONTAL so if I can get it to auto grab based on naming then I can apply that to all the different types of files.
Something like '*PRE-TEST_VERTICAL*NOM.txt' works in a similar code but I can't get it to adjust to the code below,
for i = 1:numel(fileList)
file = fullfile(directory, fileList(i).name);
[tempDir, tempFile] = fileparts(file);
status = copyfile(file, fullfile(tempDir, [tempFile, '.txt']));
[file_list, path_n] = uigetfile('.txt','Grab the files you want to process','MultiSelect','on');
if iscell(file_list) == 0;
for i = 1:length(file_list)
data_in = readmatrix([path_n filename]);