Scripting to create multiple subjects

Hi Martin

When I type in resample under search/magnifying glass (name contains resample) the correct files are filtered. I see the subject folder, then just the resampled file folder and then the raw file. I tried this code but no luck.

% Script generated by Brainstorm (29-Jan-2020)

% Input files
sFiles = [];

% Start a new report
bst_report('Start', sFiles);

% Process: Select files using search query
sFiles = bst_process('CallProcess', 'process_select_search', sFiles, [], ...
'search', '(([type EQUALS "RawData"] AND [parent CONTAINS "resample"]))');

% Process: Import MEG/EEG: Events
sFiles = bst_process('CallProcess', 'process_import_data_event', sFiles, [], ...
'subjectname', '', ...
'condition', '', ...
'eventname', '11_right, 12_right, 21_right, 22_right', ...
'timewindow', [-500, 500], ...
'epochtime', [-0.1992, 1], ...
'createcond', 1, ...
'ignoreshort', 1, ...
'channelalign', 1, ...
'usectfcomp', 1, ...
'usessp', 1, ...
'freq', [], ...
'baseline', []);

% Save and display report
ReportFile = bst_report('Save', sFiles);
bst_report('Open', ReportFile);
% bst_report('Export', ReportFile, ExportDir);