Yes, filing of form DIR-12 by the company to Registrar of Companies (ROC) is mandatory for resignation or removal of director.