Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
function check_BIDS(input_dir)
%
% check for existing BIDS directory structure
%
% this function checks if a subdirectory "BIDS" exists in the
% current subject's folder
%
% if yes, user will be asked for permission to overwrite
%
% file history:
% created M. Czisch & F. Binder 8.11.2017
cd(input_dir)
current_dir = pwd;
if exist('BIDS')
fprintf('\n\nWARNING: subdirectory tmp_BIDS already exists\n');
prompt = 'should the old file be deleted? (y/n): ';
str = input(prompt,'s');
if strcmp(str,'y')
cmd_str = ['rm -rf ', current_dir, '/BIDS']; system(cmd_str);
else
error('ERROR: old files will not be removed - programm terminates');
end
end