Code:
#this will queue the rename operation and allow you to review the result before the rename occurs.
#our goal is to rename a bunch of folders named as <mm-dd-yyyy> to <yyyy-mm-dd>
/enqueue /ren "%p%f" "%p$replacerx("%f", "^([0-9]{2})\-([0-9]{2})\-([0-9]{4})$","\3-\1-\2")"