A motion or demurrer once filed shall not be withdrawn without the consent of the adverse party in writing, or given in open court, or of the court.