diff --git a/devTools/concatFiles.bat b/devTools/concatFiles.bat
index 7eaad91f46854c5adb3310eccada2edcc7997cc1..cc02e8882fa4d3f1577254977789ca956ada1fb6 100644
--- a/devTools/concatFiles.bat
+++ b/devTools/concatFiles.bat
@@ -16,7 +16,7 @@ ECHO "Ignore the first line to skip the BOM" >%_LISTFILE%
 :: If we have powershell available, strip the absolute path information
 :: If not, fail silently (which is fine, but will leak path information into the built file)
 powershell -command "" 2> NUL
-IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -encoding utf8) -replace [regex]::escape('%CD%'),'' -replace '\"','' ^| set-content -encoding utf8 -path %_LISTFILE%"
+IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -encoding utf8) -replace [regex]::escape(\"%CD%\"),'' -replace '\"','' ^| set-content -encoding utf8 -path %_LISTFILE%"
 
 :: Append the files
 (FOR /F "skip=1 usebackq delims=" %%F IN (`type "%_LISTFILE%"`) DO (