The Code of Criminal Procedure, 1973 (CrPc)
35. Powers of Judge and Magistrates exercisable by their successors-in-office.
(1) Subject to the other provisions of this Code, the powers and duties of a Judge or Magistrate may be exercised or performed by his successor-in-office.
(2) When there is any doubt as to who is the successor-in-office of any Additional or Assistant Session Judge, the Sessions Judge shall determine by order in writing the Judge who shall, for the purposes of this Code or of any proceeding or order there under, be deemed to be the successor-in-office of such Additional or Assistant Sessions Judge.
(3) When there is any doubt as to who is the successor-in-office of any Magistrate, the Chief Judicial Magistrate, or the District Magistrate, as the case may be, shall determine by order in writing the Magistrate who shall, for the purposes of this Code or of any proceedings or order thereunder, be deemed to be successor-in-office of such Magistrate.