The output of this batch script is `Hello!` as expected:

```
@echo off
echo Hello!

```

However, with Delayed Expansion enabled the output is now `Hello`:

```
@echo off
setlocal EnableDelayedExpansion
echo Hello!

```

A trick is to insert `endlocal` just before the `echo`:

```
@echo off
setlocal EnableDelayedExpansion
...
endlocal
echo Hello!
setlocal EnableDelayedExpansion

```

This is tedious, however. According to [this Microsoft reference](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo), some charaters like percent (%) and caret (^) can be used to escape (and therefore print) characters such as `%`, `|` and `>`.

Is there any escape character for the exclamation mark (!) without resorting to the `endlocal` trick?