Hi Marc,
You might find that you need to zero-pad filenames. E.g. if you have
sub1, sub2, ..., sub10, sub11, ... you'll find that sub1 sorts after
sub19, etc. Whereas if the files are like sub001, sub002, ..., sub010,
... then things should be fine.
You can script something up to rename files using printf, based on the
following example.
Hope this helps,
Ged.
#!/bin/sh
# Zero-pad files, e.g. sub1.nii -> sub001.nii
pre=sub
post='.nii'
N=1
M=20
for (( i=$N; i <= $M; i=i+1 ))
do
out=`printf "%s%03d%s" $pre $i $post`
mv ${pre}${i}$post $out
done
Marc Dubin wrote:
> Does anyone know how the alphabetised listing in the 4D all_FA_skeleton file extends to numbers
> in the filenames. For instance, if three subjects went into the analysis as sub11.nii.gz, sub12.nii.gz
> and sub13.nii.gz would these be the 1st, 2nd and 3rd in the skeleton file?
>
|