filelist = {
  'LR01_rawdata.snirf'
  'LR02_rawdata.snirf'
  'LR03_rawdata.snirf'
  'LR04_rawdata.snirf'
  'LR05_rawdata.snirf'
  };


%%

for i=1:numel(filelist)
  
  filename = filelist{i};
  
  cfg = [];
  cfg.dataset = fullfile('original', filename);
  cfg.method = 'copy';
  
  % the following settings relate to the directory structure and file names
  cfg.bidsroot = 'bids';
  cfg.sub = filename(1:4); % the first four characters
  cfg.ses = [];
  cfg.run = [];
  cfg.task = 'auditoryoddball';
  cfg.datatype = 'nirs';
  
  % the following settings relate to the dataset_description.json
  cfg.dataset_description.Name                = '48-channel NIRS measured during auditory oddball task';
  cfg.dataset_description.Authors             = 'Marc van Wanrooij';
  cfg.dataset_description.ReferencesAndLinks  = {'http://www.fieldtriptoolbox.org/tutorial/nirs_multichannel/'}; % this can be a list
  cfg.dataset_description.BIDSVersion         = 'BEP030'; % this does not correspnd to an official version, but a BIDS Extension Proposal. See http://bids.neuroimaging.io/bep030
  
  data2bids(cfg)
  
end
