# Help using "Select By Filter" script/menu

**URL:** <https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315>\
**Category:** Help & Support\
**Created:** [August 4, 2020, 1:49pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315 "2020-08-04T13:49:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![belfong](https://resource.dopus.com/user_avatar/resource.dopus.com/belfong/32/59704_2.png) [@belfong](https://resource.dopus.com/u/belfong)\
**Post date:** [August 4, 2020, 1:49pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/1 "2020-08-04T13:49:16Z")

</div>

(Topic split from ["Select By Filter" menu button](https://resource.dopus.com/t/select-by-filter-menu-button/18483/1), which has the script used below to create the menu listing filters.)

* * *

I currently have a few filters:  
 ![image](https://resource.dopus.com/uploads/default/original/3X/c/6/c6ec49e7ed85a5ad79f796eed1fc2a4ce9d9448e.png)

If I were to create a "Three Button" for each of them, the filter works. But when I use the .vbs.txt script Leo provided above, selecting the filter seemed to "Select All Files", as highlighted in the screenshot in orange, instead of running the filter:

I do not know enough to debug the script.

 ![image](https://resource.dopus.com/uploads/default/original/3X/2/3/23f9ae4c21366aa19885ddb8bea9d65828704a0f.png)

Any ideas?

---

<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:** [August 4, 2020, 1:54pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/2 "2020-08-04T13:54:15Z")

</div>

Hard so say without knowing what your filters are, and what's in the button that runs the script, and information about the files that should/shouldn't be matched. Please provide more detail.

---

<div class="post-metadata">

**Author:** ![belfong](https://resource.dopus.com/user_avatar/resource.dopus.com/belfong/32/59704_2.png) [@belfong](https://resource.dopus.com/u/belfong)\
**Post date:** [August 4, 2020, 1:58pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/3 "2020-08-04T13:58:45Z")

</div>

My 2019 1Q, 2Q, 3Q filters are simple Date Created matches:  
 ![image](https://resource.dopus.com/uploads/default/original/3X/c/6/c6157a98fbe87b88125b0d7729b3c4eedb9dde07.png)

And the button to run the .vbs.txt is as follow:  
 ![image](https://resource.dopus.com/uploads/default/original/3X/6/4/64030fb9f20bd0f8ef06f85e318bf7b9c7cfe46b.png)

When, clicked, the button showed the filter:  
 ![image](https://resource.dopus.com/uploads/default/original/3X/2/c/2c2512c9221663abbf5a5fdffe6ddd9e86f5f4fa.png)

---

<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:** [August 4, 2020, 10:31pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/4 "2020-08-04T22:31:50Z")

</div>

Your _2019 1Q_ filter seems to do the opposite of what you'd want. It selects things which were _not_ created within the first quarter of 2019.

Do your filters work properly with Tools \> Find Files \> Advanced? Check them there first.

---

<div class="post-metadata">

**Author:** ![belfong](https://resource.dopus.com/user_avatar/resource.dopus.com/belfong/32/59704_2.png) [@belfong](https://resource.dopus.com/u/belfong)\
**Post date:** [August 5, 2020, 5:14am UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/5 "2020-08-05T05:14:02Z")

</div>

My filter is working as expected:

 ![image](https://resource.dopus.com/uploads/default/original/3X/3/f/3fded559f256176e6558ecf4b2a2d9a0918227a3.png)

(yes, I am not sure why I have to use "No Match" instead of "Match". It's like a negative of a negative).

---

<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:** [August 5, 2020, 10:09am UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/6 "2020-08-05T10:09:24Z")

</div>

> [@belfong](#):
>
> (yes, I am not sure why I have to use "No Match" instead of "Match". It's like a negative of a negative).

Where is the second negative? It's not in the filter itself.

The filter says: Do not match things created between 1/1/2019 and 31/1/2019

If you're using that filter with Find, it should not be matching those files.

Can you show a screenshot of how the Find panel is configured, not just the results?

---

<div class="post-metadata">

**Author:** ![belfong](https://resource.dopus.com/user_avatar/resource.dopus.com/belfong/32/59704_2.png) [@belfong](https://resource.dopus.com/u/belfong)\
**Post date:** [August 5, 2020, 12:08pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/7 "2020-08-05T12:08:51Z")

</div>

> [@Leo](#):
>
> If you're using that filter with Find, it should not be matching those files.

I am not using the filter with Find, as in Ctrl-F, Find, if this is what you mean.  
I created a button which then called the filter using the function:

Select FILTER PATTERN="2019 1Q" DESELECTNOMATCH HIDESEL SHOWHIDDEN

Maybe this is the reason?

My Find panel has nothing in there:

 ![image](https://resource.dopus.com/uploads/default/original/3X/b/c/bc68191dbd397e66be7552705df8275eb05eb4a9.png)

---

<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:** [August 5, 2020, 12:19pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/8 "2020-08-05T12:19:32Z")

</div>

> [@belfong](#):
>
> Select FILTER PATTERN="2019 1Q" DESELECTNOMATCH HIDESEL SHOWHIDDEN

Now the double-negative is clear. Your `Select` command is using `HIDESEL` so it _hides_ the things that _match_ the filter.

I'd recommend reversing the filter, so it matches the things you want to see (not the things you don't want to see), and then using `HIDEUNSEL` instead of `HIDESEL` if you want to use it with the `Select` command.

Then the filter can be more easily used with other things, like the Select By Filter menu you wanted to use it with at the start of the thread.

> [@belfong](#):
>
> My Find panel has nothing in there:

You can load your filter into the Find panel by moving the mouse over where it says "Filter: new filter" in the screenshot and clicking there (over the "new filter" part, specifically). A list of saved filters will appear.

Using the Find tool is usually the best/easiest way to test how a filter works and see what it does or doesn't match.

---

<div class="post-metadata">

**Author:** ![belfong](https://resource.dopus.com/user_avatar/resource.dopus.com/belfong/32/59704_2.png) [@belfong](https://resource.dopus.com/u/belfong)\
**Post date:** [August 5, 2020, 1:23pm UTC](https://resource.dopus.com/t/help-using-select-by-filter-script-menu/36315/9 "2020-08-05T13:23:40Z")

</div>

> [@Leo](#):
>
> "Filter: new filter" in the screenshot and clicking there (over the "new filter" part, specifically). A list of saved filters will appear.

This is super useful. Thank you so much, Leo! \<3
