I simply used a line of code like the following to create a list of frames. Hope this helps. Ping for n = 1:nScan P{n} = [path, 4D_fName, '.nii,', num2str(n)]; end -----Original Message----- From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Thomas Stephan Sent: Wednesday, July 18, 2007 10:21 AM To: [log in to unmask] Subject: [SPM] spm_select without GUI. . Dear List, we try to use spm_select to gather files for batch-mode processing without using the GUI. In SPM2 we used to use spm_get which provided us with a list of e.g. all the image files in a directory. We managed to do this with spm_select and a few matlab commands that add the path information to the file names. However, spm_select does not append the frame information at the end of the filenames (e.g. ',1' for 3D files, ',n' for 4D files). How can we force spm_select to produce a list of frames similar to the lists it generates when using the GUI? Using this command: [files,dirs]=spm_select('List',dirn,fmask,'1:80') gives this result: files = s004a001.nii based on the help from spm_select, we thought that the command above should give us a list like: s004a001.nii,1 s004a001.nii,2 s004a001.nii,3 ... We also tried to use the 'Filter' option on the list of files, without success. Best regards Thomas Stephan