Now the script creates path: patientID/Modality instead of patientID/Study/Modality. I just commented a few lines so it can be easily changed if needed. As a final goal I would see a parameter that you pass to the function and that directs what is the created path. Maybe sth like: compileData(boolean patientID, boolean Study, boolean Series, boolean Modality). Another thing is that compileData function should be implemented to DicomTamerGUI.