Folder Tree behavior

I have a button designed to remove the first seven characters and the last seven characters in a folder name, with the code:

@NoDeselect
@dirsonly
Rename REGEXP PATTERN=".{7}(.+).{7}" TO="\1\2"

What's odd is that the button works just fine on folders displayed in a regular "lister" window, but does nothing if I try to execute it on folders displayed in the Folder Tree. Am I missing something?

Most commands act on the Source file display and ignore the folder tree.

(The Delete command is one exception, unless NOFROMFOCUS is added to it.)

If you put commands into the right-click menu for folders, then they will work on the folder tree when you right-click a folder, since that explicitly makes the right-clicked folder the target of the command. But otherwise it is normally the selected items in the file display, not the folder tree, which commands act on.