clear all;
close all;
V_FolderIn = '/home/xyz/blablabla/FolderWhereBVFilesAre/';
V_DataFolder = '/home/xyz/blablabla/FolderWhereCNTFilesShouldBe/';
V_Participant = 'xx';
CA_Participants = {'Subj_01','Subj_02','Subj_03','Subj_28'};
for V_Counter = 1:length(CA_Participants)
V_Participant = CA_Participants{V_Counter};
V_FileIn = fullfile(V_FolderIn, [V_Participant '.vhdr']);
fprintf('########################################################\n\n');
fprintf('Reading %s.\n\n', V_FileIn);
EEG = pop_fileio(V_FileIn);
CNT_filename = [V_Participant '.cnt'];
TRG_filename = [V_Participant '.trg'];
pop_writeeepcnt(EEG, 'filename', CNT_filename, 'pathname', V_DataFolder);
pop_writeeeptrg(EEG, 'filename', TRG_filename, 'pathname', V_DataFolder);
fprintf('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n');
fprintf('Exported Brain Vision Data as EEP CNT file ... %s.\n\n', V_Participant);
fprintf('########################################################\n\n');
end;