Command: SelectEx (extended Select command)

Over 1 million files, ok! I thought I have a lot of files, now I know better. o)
How long did it take to select half a million?

In the first post, the example code that discusses selecting a random file seems to have a typo.

        Examples:
        - Select a random file, run the doubleclick action and make item visible
          (chooses a movie and autom. launches player eg.)
          SelectEx RANDOM FILES ACTION=dblclck MAKEVISIBLE

This code selected a randomized image file and scrolled through the folder so that the image file was shown on screen, but the image file did not double click or open up into a new image viewer window.

I changed the "dblclck" to "dblclk" and got it to open in the image viewer window.

The issue for me is that this opened an image viewer window, and I was unable to scroll to other images. This window seemed to only scroll through the file list of the images that were selected. The button/command did nothing if I opened an image window normally and clicked the button that I'd placed on the image window's toolbar.

What I'm hoping to find/make is a way to go to a folder filled with images (and possibly webms later on) and have a "move to a random image that is inside this directory" button in between the "previous" and "next" buttons.

By the time i started composing the previous post, and switched back to dopus to copy the error message, it was done, so I am guessing 30 seconds to a minute? Originally my post had a different ending suggesting that it didn't work :stuck_out_tongue: but when I switched back to the window, it had, so changed it to works great! :slight_smile:

BTW i was exaggerating it was not a million files, it was less, about 400K i think.
This was just filenames (with no data) for some software testing, indexing files and such.

Is it possible to have this work in an ftp session window? I am trying to use selectex to select files from an ftp site via a text file then manually drag the selection across to download. Works great on local drives but doesn't select anything in a ftp window/session.

v.0.5.8 - 2021.03.07 - fix ftp path handling
Does this version fix the issue for you?

EDIT: Download of v.0.5.8 posted here, moved to thread opening/download section.

1 Like

Works Great! Thanks so much!

You're welcome and thank you for the feedback. o)

Thank you for this great script. I have one slight problem however. All is working fine except this: If I choose the "Filter List (multi)/ Show By Filter" or "Filter List (multi)/ Hide By Filter (unmatched)" options and select more than one filter I get a blank screen as result. When I choose one filter it works like it should be. I think it has something to do with the FILTER FILTERFLAGS="hidenomatch,deselect" option? Can you confirm that this could be a bug in DO in conjunction with combining several filters at the same time or something else?
Thank you for your reply...

Yes, you were are right, it's not necessarily a bug in DO. Selecting by filter only works with a single filter, specific FILTERFLAGS just screw up the result if multiple filters are selected and the command runs repeatedly. I just changed the menu buttons to not use the FILTERFLAGS and do necessary hide/show by separate commands before/after the selection by filter(s) is done.

So I fixed the corresponding buttons, maybe download v0.2 of the menu and try again.

I also removed..
"Filter List (multi) -> Hide By Filter (unmatched)" as it is exactly the same as "Show By Filter".
I also removed..
"Filter List (multi) -> Show By Filter (unmatched)" as it is exactly the same as "Hide By Filter".

Hello tbone,

thanks for the script, I use it mainly for selecting random files by size or quantity using dlg-command. Is there an easy way to use a GUI with radiobuttons instead pulldown-menu?

Hi Sasa, I can't really imagine what you like to accomplish with radio buttons, because I think a regular button or a single (SelectEx) command seems to be a "single choice" kind of input already? You know the capabilities of DOs buttons and menus, if it cannot be done with these regular toolbar elements, there's a chance you could create a custom dialog, but that involves scripting and probably is not the easy way you were thinking of.

What do you mean with "dlg-command" btw.? Maybe that's the key to understand what you're after?

Thanks for reply.

It just would be nice to have one gui where to enter e.g. quantity and then filetypes (all files; audio; video;...) as radiobuttons instead of two pulldown-menus (using dlgchoose).

Mhh, das kriegst Du doch auch selbst hin! o) It's not much code to write and I guess there are some examples around to get values from input fields and run a DO command via scripting, DO even has an UI editor at hand. Maybe just open a new thread, somebody might jump the gun and help out?! Maybe you do the dialog yourself at least, somebody might pick it up and add some lines of scripting for you.

@tbone - one suggestion to enhance SelectEx:

For "Select N-th.." add user input via script config or popup dialog for starting position. In "Select N-th.." current form, it always starts at the first item in the display. A user may want to start at another line item.

For me personally, I have simply altered line 1295 from this:

for(var i=1;i<=sourcetab.all.count;i=i+nth)

to this:

for(var i=nth;i<=sourcetab.all.count;i=i+nth)

I think it would add value to provide user input for the i variable.

Regardless, THANK YOU for a great script!

I've had this script for ages without playing with it. I just had a use-case for label filters and came on the board looking for a solution and found out I've had it all along. Thanks!

How can I select random files from a specific folder and its subfolders?
My use would be to have a button that selects 10 random images from a specific folder on my hard drive and then have them open in a slideshow.
Also a button to open a random video from my video folder

1 Like

There is the RANDOM switch and the ITEMCOUNT, PATH options, so try something like this:

SelectEx PATH=C:\MyImages RANDOM FILES ITEMCOUNT=10 NAME="\.(jpg|png|gif|bmp)" DESELECTNOMATCH COMMANDS=Show SLIDESHOW

Thanks for this. I modified it just a bit to do it in whatever directory I'm in. If there's a better way than I chose, please let me know.

SelectEx PATH={sourcepath$} RANDOM FILES ITEMCOUNT=10 NAME="\.(jpg|png|gif|bmp)" DESELECTNOMATCH COMMANDS=Show SLIDESHOW

Hello,

I've been looking around to find a solution, but can't find it in earlier posts. I want to random select 100 mp3 files and collect them in a collection named 'MyColl'. I have so far

SelectEx RANDOM ITEMCOUNT=100 NAME=".mp3$" FILES MAKEVISIBLE DESELECTNOMATCH COPYTOCOLL=MyColl COMMANDS=Go coll://MyColl

This works perfectly for the folders, but it wont pick anything from the subfolders in it.
Did i miss something? Is there a solution for it?

greetings

Entering Flat View (No Folders) before running the command may be all you need.