
    The People of the State of New York, Respondent, v Dale Martin, Appellant.
    [963 NYS2d 770]
   Spain, J.

Appeal from a judgment of the County Court of St. Lawrence County (Richards, J.), rendered December 19, 2011, convicting defendant upon his plea of guilty of the crime of attempted assault in the second degree.

As part of an agreement resolving charges arising out of numerous incidents, defendant pleaded guilty to attempted assault in the second degree and waived his right to appeal. County Court, in turn, agreed to sentence defendant to a prison term of lVa to 4 years and to direct his enrollment in the shock incarceration program if he successfully continued drug treatment. Defendant thereafter tested positive for an unprescribed medication and was discharged from the treatment program. County Court nevertheless imposed the initially contemplated prison sentence, and defendant now appeals.

We affirm. Defendant stated during the plea colloquy that he understood his right to appeal and wished to waive it, executed a detailed written waiver, then reiterated at sentencing that he understood that the right to appeal was separate and distinct from the other rights he was giving up (see People v Lopez, 6 NY3d 248, 256 [2006]). Accordingly, we conclude that he knowingly, intelligently and voluntarily waived his right to appeal (see People v Bradshaw, 18 NY3d 257, 264 [2011]; People v Lopez, 6 NY3d at 256; People v Lopez, 97 AD3d 853, 853 [2012], lv denied 19 NY3d 1027 [2012]). Inasmuch as County Court adhered to its sentencing commitment, defendant’s valid appeal waiver precludes his sole assertion that the sentence was harsh and excessive (see People v Lopez, 6 NY3d at 255-256; People v Koumjian, 101 AD3d 1175, 1175 [2012], lv denied 20 NY3d 1100 [2013]; People v Garrand, 100 AD3d 1156, 1157 [2012], lv denied 20 NY3d 1011 [2013]).

Mercure, J.E, McCarthy and Egan Jr., JJ., concur.

Ordered that the judgment is affirmed. 
      
      
         We note that County Court could recommend but not direct defendant’s enrollment in shock incarceration because he did not plead guilty to a drug offense (see Penal Law § 60.04 [7]); the court’s order in that regard constituted a nonhinding recommendation (see Correction Law § 71 [6]; Matter of Ferreri v Fischer, 69 AD3d 1014, 1014 [2010], lv denied 14 NY3d 707 [2010]). Defendant does not claim that this discrepancy rendered his guilty plea involuntary and, in any event, such an argument is not preserved for our review given that the record does not reveal that he moved to withdraw his guilty plea or to vacate the judgment of conviction (see People v Brown, 58 AD3d 540, 540 [2009], lv denied 12 NY3d 814 [2009]).
     