help
help > Error when removing initial first scans (CONN25.b)
Mar 5, 2026 03:03 AM | meikei leung
Error when removing initial first scans (CONN25.b)
Hi Alfonso,
Thank you for the CONN toolbox. When removing the first 10 scans using the "removal of first scans" function in the preprocessing pipeline, I ran into the following error no matter whether this removal step is placed at the very beginning, or after the "label as original data" step. Any idea?
*******************************************************
ERROR DESCRIPTION:
Error using conn_fileutils (line 96)
Error copying file
C:\Users\WL\Desktop\FunImg_F25001_TR395\F25001\au0005_Bold_RESTINGSTATE_FIXATION_Bold_RESTINGSTATE_FIXATION_20250624152812_5.nii,11
to
C:\Users\WL\Desktop\FunImg_F25001_TR395\F25001\rau0005_Bold_RESTINGSTATE_FIXATION_Bold_RESTINGSTATE_FIXATION_20250624152812_5.nii,11,
missing file or invalid file permissions
Error in conn_fileutils>@(a,b)conn_fileutils(option,a,b) (line 90)
elseif iscell(varargin{1}), cellfun(@(a,b)conn_fileutils(option,a,b),varargin{1},varargin{2},'uni',0);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_fileutils (line 90)
elseif iscell(varargin{1}), cellfun(@(a,b)conn_fileutils(option,a,b),varargin{1},varargin{2},'uni',0);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_setup_preproc (line 3037)
conn_fileutils('filecopy',temp,newtemp); % note: copy files (instead of using coreg.estwrite) in order to keep voxel resolution the same
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn (line 1472)
ok=conn_setup_preproc('',varargin{2:end});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_menumanager (line 125)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONN25.b
SPM25 + DAiSS DEM FieldMap MEEGtools
Matlab v.2025b
project: CONN25.b
storage: 540.4Gb available
spm @ C:\Users\WL\Documents\spm_25.01.02\spm
conn @ C:\Users\WL\Documents\conn25b\conn
Error using conn_fileutils (line 96)
Error copying file
C:\Users\WL\Desktop\FunImg_F25001_TR395\F25001\au0005_Bold_RESTINGSTATE_FIXATION_Bold_RESTINGSTATE_FIXATION_20250624152812_5.nii,11
to
C:\Users\WL\Desktop\FunImg_F25001_TR395\F25001\rau0005_Bold_RESTINGSTATE_FIXATION_Bold_RESTINGSTATE_FIXATION_20250624152812_5.nii,11,
missing file or invalid file permissions
Error in conn_fileutils>@(a,b)conn_fileutils(option,a,b) (line 90)
elseif iscell(varargin{1}), cellfun(@(a,b)conn_fileutils(option,a,b),varargin{1},varargin{2},'uni',0);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_fileutils (line 90)
elseif iscell(varargin{1}), cellfun(@(a,b)conn_fileutils(option,a,b),varargin{1},varargin{2},'uni',0);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_setup_preproc (line 3037)
conn_fileutils('filecopy',temp,newtemp); % note: copy files (instead of using coreg.estwrite) in order to keep voxel resolution the same
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn (line 1472)
ok=conn_setup_preproc('',varargin{2:end});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in conn_menumanager (line 125)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONN25.b
SPM25 + DAiSS DEM FieldMap MEEGtools
Matlab v.2025b
project: CONN25.b
storage: 540.4Gb available
spm @ C:\Users\WL\Documents\spm_25.01.02\spm
conn @ C:\Users\WL\Documents\conn25b\conn
*****************************************************************
Alternatively, I read in previous threads
that it seems not a must to remove the initial scans, because the
Denoising step will "find the minimal combination of confounds
for robust voxel-to-voxel histograms" that can also take care
of any issues with the initial scans (if any) via the "effect of
rest" regressor. Is this correct?
Thanks for your comment on this,
meikei
