Is there a possibility to insert in command a filter for time. I want to transfer only the studies created in a specific time interval.


You could easily create such a Python script by merging “” with the “” sample scripts:

Please share your findings here, as it might be useful to other people in the Orthanc community.


i’ve long been thinking about the same question. Now i’d like to share my solution. It was not so trivial, because just merging the scripts would parse every instance of the whole database, which takes a lot of time.
I found a solution to parse only the studies in the desired time range for the instances, so the resulting script is fast.
You can comment out the last line for testing.

It’s working fine for me, but please verify, because i’m not a professional coder. I’ve marked the changes with “#added by MS”

Mark (3.78 KB)

Dear Mark,
I am interested in your way, can you please tell me how to start the script. i.e. with parameters,


Dear Mark,
Again, thanks for your script, it is of great use for me, but still I have an issue in running it, do you think that date format is an issue for windows environment ? i.e. is it 20220131 or 01312022 ,

your help is appreciated ,