$Container holds the '/' terminated path to the current note. The attribute can be set by the user and in doing so the note is moved to a new parent container. Such an approach is useful if processing notes that then can be archived away from still-current content.
Using $Container with agent actions. Care needs to be taken as agents act on aliases. Therefore an agent action seeking to move a note must act on the original of the note, i.e. via $Container(original).
Tinderbox is forgiving if a $Container is set with no trailing "/". For example, this agent action will work:
$Container="/work/projects";
However, this is the correct way:
$Container="/work/projects/";
The error (in the first example above) if the last container in the target path is a variable. For example:
$Container="/work/"+$MyString(agent);
Luckily that does work but should really be :
$Container="/work/projects/"+$MyString(agent)+"/";
See also—notes linking to here: