: Die Operation ist nicht erlaubt
A last try: What do you get if you run it with basex (the standalone, not the client)?
I think the if/then can be left out, because the query will always fail
sequentially before the delete if something goes wrong with the copy (?)
Exactly.