There is a tool called oh-my-batch that can directly accomplish this. (Disclosure: I am the developer of this tool.)
To use it, you need to install it first
pip install oh-my-batch
Then for your case, all you need to do is to run
omb job slurm submit "D*/slurm-run-orca.job"
It looks like you are running comp-chem tasks, actually there is an example in the project you may have insterest: https://github.com/link89/oh-my-batch/tree/main/examples/tesla