(a) Fingerprints and photographs shall be taken of a child taken into custody for any act which would be a felony if committed by an adult. If such act would be a misdemeanor if committed by an adult, photographs and fingerprints may be taken; provided further that if the child is under the age of 14, prior permission from a judge shall be obtained.
(b) Notwithstanding subsection (a) of this section, any child who is committed to an institution operated by Youth Services Administration may be fingerprinted and photographed without order of the court. Such fingerprints and photographs shall be held in the same confidential manner as other records maintained by the Youth Services Administration.
(c) If the Attorney General has dismissed charges against the child or after a reasonable time has failed to file charges against the child, a motion on the part of a child whose fingerprints or photographs were taken pursuant to this section, may move that the court have the fingerprints or photographs destroyed. After hearing from the Attorney General and the child, the court may order the destruction of the fingerprints and photographs.