for /L %%a in (2017,1,2023) do (
pushd ..\%%a
echo export >temp.txt
echo import >>temp.txt
setlocal enabledelayedexpansion
for /f %%b in (temp.txt) do (
for /f "skip=21" %%c in (map_all_%%b_12.txt) do (
set str=%%c
echo !str:~0,3! >>std_map_%%b_HS2.txt
)
)
popd
)