Loading...
 

A collection of Brainstorm recipes useful n automating analyses, but related to database management and data selection/organization. No real analysis code here !

How to rename Brainstorm condition/folders

~~#090:% This snippet renames a condition/folder in the Brainstorm database.
% As input requires:
%   - subject name (subjectName)
%   - the name of the condition you want to rename (oldConditionName)
%   - the new name for the condition/folder (newConditionName)
%   - the id of the study corresponding to the condition (iStudy)~~

subjectName
oldConditionName = 'MyConditionOld';
newConditionName = 'MyConditionNew';
iStudy = 3;    % This can be obtained in many ways (see other snippets)

% Get the sStudy structure correspondong to the study index in the database
sStudy = bst_get('Study', iStudy);


% Actually rename the condition/folder
db_rename_condition(bst_fullfile(subject, sStudy.Condition{1}), bst_fullfile(subject, newCondition));
Created by davide.tabarelli. Last Modification: Thursday 19 of September, 2019 15:37:04 CEST by davide.tabarelli.