Way to enumerate in 2 digit format

I am trying to enumerate some parsed waves. While I can enumerate them using my counter in a for loop, ie basename_1, basename_2, etc., I'd like to have a leading zero, eg basename_01. Any suggestions of how to best accomplish this?
Function Demo(baseName)
    String baseName
   
    Variable i
    for(i=0; i<=3; i+=1)
        String name
        sprintf name, "%s_%02d", baseName, i
        Wave/Z w = $name
        if (WaveExists(w))
            Printf "%s exists\r", name
        else
            Printf "%s does not exist\r", name
        endif  
    endfor
End