In counties contained within New York City and in counties that have a
commissioner of correction who is responsible for detention of
defendants in criminal actions, it is the duty of the commissioner of
correction of such city or county to deliver the defendant forthwith to
the proper institution in accordance with the commitment. In all other
counties it is the duty of the sheriff to deliver the defendant
forthwith to the proper institution in accordance with the commitment.