I've made a quick patch to fix this in the short term. I've put it in my fork.
It allows a directory as an argument and processes all DCM files in that.
A more elegant solution would be to allow a choice of file extension as an argument and optional processing of subdirectories, but this mitigates the issue for now.
Can you put in a pull request so I can see how that works. I'm hoping that the system will facilitate me taking that change without merging all your other changes.
A little googling suggests that this could actually work as David requested by simply assuming an array of strings will be passed. If used conventionally, the array will be one string long. If wildcards are used in the shell, then they will be expanded before openrem_rdsr.py sees it.
I've submitted a pull request. I think I've done it correctly.
Modified the script portion of rdsr import to allow for mulitple arguments (files), or wildcard shell expansion such as *.dcm. Will need to be duplicated to the other import scripts. Refs #9.
Fixes #9. Can now pass a list of dicom files to each of the rdsr, mg and ctphilips scripts. Typical syntax would be 'openrem_rdsr.py myfiles/*.dcm'. Will abandon other branch as it was too complicated for what was needed.
Reopening as the Windows cmd.exe shell doesn't do wildcard expansion, instead relying on the application to do it.
Therefore passing *.dcm to openrem_rdsr.py will try and process the file *.dcm
Changed Windows path advise to match my install, added information about wildcard expansion for linux and that it doesn't currently work for the standard Windows shell (refs #9), changed styling of commands to be sourcecode.
Modified scripts to glob the filenames so that in Windows * wildcards will be expanded. Modified rdsr.py and ct_philips.py as they had a sys.exit if the study existed in the database, which then made the glob versions of the scripts stop. Should fix #9 again.