You can use wildcards to specify directories as well, as in
Fred*/IM*
However, the order may not be what you want. More details are needed about how you have ordered your files.
You could also checkout the Dimon program, which can help with this DICOM to AFNI conversion. However, the author of Dimon, Rick Reynolds, isn't available to help you just now, since he is lounging on a Caribbean beach sipping margaritas at this moment.