This did the trick, using %%~dpG also had the backslach so i also had to remove that.
%%~dpG
CD /d %searchFolder% FOR /D /r %%G in ("?earch") DO set dir=%%~dpG set dir=%dir:~0, -1%
1.4m articles
1.4m replys
5 comments
57.0k users