Cmd and exclamation marks - Part II
问题 I'm really wondering why my string replacement procedure works when parsing text files containing any special characters including exclamation marks. I expected that delayed variable expansion would switch off special meaning of ampersand, percent sign etc. but will fail instead for exclamation marks... Code: @echo on & setlocal ENABLEEXTENSIONS set "InFile=%~1" set "OutFile=%~2" set "Replace=%~3" CALL :ParseCue "%%InFile%%" "%%OutFile%%" "%%Replace%%" endlocal &GOTO:EOF :ParseCue @echo on &