Everything before the for loop works fine, i can add "pause" to it and it pauses, but inside the for loop it does not work. I have tried to add pause but it doesn't, and the pause after the loop does not occur.
@echo off
setlocal enabledelayedexpansion
setlocal
for %%g in ( * ) do (
pause
echo %%g
set strEnd=___EndOfString___
set strFilename=%%g
set strFile=!strFilename!!strEnd!
echo !strFile!
pause
:loop
set strChar=!strFile:~0,1!
set strFile=!strFile:~1!
if !strChar!==a echo A
pause
if not !strFile!==!strEnd! goto loop
)
pause
endlocal