# Scripting: Labels and Goto Commands

> Using Labels and GOTO commands for flow control in NiceProtect scripts. How to structure complex protection scenarios and loops.

Canonical HTML: <https://www.niceprotect.com/help/labels.htm>

## Labels

**label** <name> - Defines a jump label with the specified name. Labels are resolved before execution, so you can jump forward or backward.

**goto** <label> - Transfers control (jumps) to the specified label. Append an **if** clause to jump only when a condition holds, for example: goto done, if @_count = 3
