You name another bank account number, they will transfer your funds.
## Edit
But banks cancelling your account is not something without consequences. Your credit rating may and propably will suffer.
Do you have american style credit ranking in Germany?
Every country with a developed consumer credit market has credit scoring.
That's not true, there's no such thing in France, only Banque de France storing your loan and account history that lenders can consult on top of actual circumstances ( employment, etc) to determine credit worthiness
It collects much less information than American credit bureaus, but the SCHUFA does save what banks you have accounts with and for how long - the longer the better.