There isn't a real tail feature in windows, but if you just want the last directory you can select it very quickly using this trick at the cli:
SET "_Folder="
FOR /F "Tokens=*" %A in ('
DIR /AD /O-N /B
"C:\path\to\folders\*"
') Do @(
IF Defined _Folder (
Dir >&0
) ELSE (
Set "_Folder=%A"
)
)
CD "%_Folder%"
Note, tou don't have to do the CD outside the loop, you can do it inside the else condition instead and forgo setting a variable.
Further the IF logical construct isn't nessessary if only matching the first or last directory, but I left it above because I think it may look cleaner as an example when parsing the logic.
Below takes both of these changes into account
FOR /F "Tokens=*" %A in ('
DIR /AD /O-N /B
"C:\path\to\folders\*"
') Do @(
CD "%A"
Dir >&0
)