Looks like the format you are dealing with is:
"archive YYYYyyMMDD hhmm"
whereas:
YYYY - Year 4 digit
yy - Year 2 digit
MM - Month
DD - Day
hh - hour in 24 hour format
mm - minute
Since the folder name always has the same number of digits in your case you can use simple string compare or sort the folder names by name in order to get the one with the latest time stamp
Also redefine the default white-space delimiter of the FOR command to "no delimiter" in order to get the full folder name including white-spaces and use parenthesis around the folder name.
Like this:
set myfolder=
for /f [highlight]"delims="[/highlight] %%a in ('"dir /AD /B [highlight]/ON[/highlight] [highlight]"[/highlight]archive *[highlight]"[/highlight] "') do set myfolder=%%a
echo.folder with the latest timestamp is "%myfolder%"
echo.YYYY = %myfolder:~8,4%
echo.yy = %myfolder:~12,2%
echo.MM = %myfolder:~14,2%
echo.DD = %myfolder:~16,2%
echo.hh = %myfolder:~19,2%
echo.mm = %myfolder:~21,2%
DOS IT HELP?