UseSubfolders
is an option for DcmToNii. If set True the nii conversion is done for each folder in the selected input folder.