How to select every x files

Hello,

I'm looking for a way to quickly select every x files. For instance, I'd like to hit a button / key command and instantly select every 2 files in a folder or in a search result:
DOpus_Select_1_file_out_of_2

I checked the "Select by Pattern" in the documentation, but I didn't find the corresponding Wildcard or Regex info that would achieve this.

Any help would be appreciated.

Thanks!

This thread might prove helpful:

Hi Chuck,

Many thanks for your fast reply!

I tried the 4 suggested methods, but they all don't work as expected on my end:

  1. This button and the CMD script file.
    The box appears, I enter the desired value (e.g., 2), hit OK, and then the "index" column is added, but only the first file is selected.

  2. This button.
    I click on the button and then this error message appears: "Windows cannot find 'SelectEx'. Make sure you typed the name correctly, and then try again.".

  3. This button.
    The box appears, I enter the desired value and this error message appears: "Windows cannot find 'SelectEx'. Make sure you typed the name correctly, and then try again.".

  4. In the SelEx menu button → More → Select N-th.
    The box appears, I enter the desired value, and then: error message "Windows cannot find 'SelectEx'. Make sure you typed the name correctly, and then try again.".

Any further help would be appreciated.

Thanks!

@Alderyos - Go back to the thread I pointed out and look at the very first post. Download the SelectEx script and button:

v.0.5.8 - 2021.03.07 - fix ftp path handling
Command.Generic_SelectEx.js.txt (158.4 KB)

Menu-Button & Preview:
SelectEx_MenuButton_v0.2.dcf (2022.01.30) (39.7 KB)

Add the menu-button to a toolbar, then look at the "Select N-th.." button. Here's the code:

SelectEx EXACT MAKEVISIBLE NTH={dlgstring|Enter number to use for n-th selection:|3} 

It does exactly what you want.

If you are unfamiliar with buttons and scripts, reference this post:

Hello @Chuck,

Sorry for the delay and many thanks for your quick support! It now works as intended.

I had to add Comment.Generic_SelectEx.js.txt to the scripts list.

Now, I'll try to find a way to prevent the Index column (# header) to be automatically enabled once the script is performed. If someone could help me with this, any hint would be appreciated.

Cheers!

@Alderyos - Glad it works for you. Interesting, I never noticed the index column appearance because I keep the index column on...

That said, I'm by no means a jscript expert, but I think the script as built requires the index column as part of its various select function calculations.

To get around this, add the following as the last line of your "Select N-th.." button code:

Set COLUMNSREMOVE=index
1 Like

Wonderful! It works like a charm!

I'm very happy. Thanks a lot again @Chuck! :slightly_smiling_face:

Cheers!

SelectEx is using the native DO command "Select RANGE.." to do the NTH feature. "Select RANGE.." is what triggers the index column, I don't know why that is, but that's why it's popping up.

Glad you got it all sorted, I was about to come here and help you install SelectEx, but it seems you already had some helping hands (I did not receive notifications about the recent posts). Anyway, have a nice day everone.. o)

1 Like