# Folder Tree behavior

**URL:** <https://resource.dopus.com/t/folder-tree-behavior/25704>\
**Category:** Help & Support\
**Created:** [April 28, 2017, 8:55pm UTC](https://resource.dopus.com/t/folder-tree-behavior/25704 "2017-04-28T20:55:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElectricShoelace](https://resource.dopus.com/letter_avatar_proxy/v4/letter/e/dfb087/32.png) [@ElectricShoelace](https://resource.dopus.com/u/ElectricShoelace)\
**Post date:** [April 28, 2017, 8:55pm UTC](https://resource.dopus.com/t/folder-tree-behavior/25704/1 "2017-04-28T20:55:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [April 28, 2017, 9:10pm UTC](https://resource.dopus.com/t/folder-tree-behavior/25704/2 "2017-04-28T21:10:03Z")

</div>

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.
