How do I select random files using a shortcut?

General discussion related to "Everything".
Post Reply
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

How do I select random files using a shortcut?

Post by bookbookbook1 »

I know there's a
view > sort by > randomize` option,

but it doesn't select any files, it just changes the order of the list. :D
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

Everything currently doesn't have a way to select a random file.

I will add ways to do this and make a post here once I have something ready for testing.



For now, the best option is to reset the sort, sort by random and select the top result:

Code: Select all

Everything.exe -sort name
Everything.exe -sort random -focus-top-result
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

Re: How do I select random files using a shortcut?

Post by bookbookbook1 »

void wrote: Fri Nov 14, 2025 12:13 am

Code: Select all

Everything.exe -sort name
Everything.exe -sort random -focus-top-result
Thanks so much! more question: where do I put this code?


Is there a keyboard shortcut to select the next file in the list?
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

Ah, sorry I thought you wanted a shortcut file that calls Everything.

For a shortcut key, please try a bookmark:
  • In Everything 1.5, from the Bookmarks menu, click Add to bookmarks....
  • Change the Name to:
    Select Random Item
  • Change the Search to:

    Code: Select all

    /sort name
    /sort random
    /select-top
    /focus 10020
    
  • Choose a keyboard shortcut.
  • Click OK.
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

Re: How do I select random files using a shortcut?

Post by bookbookbook1 »

when I press the shortcut, appears "/select-top" in the search bar
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

What version of Everything are you using? (Help -> About Everything)

/select-top was add 1384.
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

Re: How do I select random files using a shortcut?

Post by bookbookbook1 »

1383a
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

Instead of
/select-top
, please try:

/command 41022


This is UI_ID_RESULT_LIST_START, ie: select the first result.
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

Re: How do I select random files using a shortcut?

Post by bookbookbook1 »

Oh, thank you. It worked now, but it doesn't do the randomization like the sort by > randomize function, it only selects the first item.
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

/sort
was added in 1400a.

Please try:

Code: Select all

/command 41300
/command 40137
/command 41022
/focus 10020
/command 41300
= Sort by name.
/command 40137
= Sort by random.
/command 41022
= First result.
/focus 10020
= Focus result list.

Command IDs
bookbookbook1
Posts: 8
Joined: Thu Nov 13, 2025 10:57 pm

Re: How do I select random files using a shortcut?

Post by bookbookbook1 »

IT WORKED, thank you, Void! You're the man!
void
Developer
Posts: 19830
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do I select random files using a shortcut?

Post by void »

Everything 1.5.0.1401a adds a select random result command.

To bind a keyboard shortcut to select a random result:
  • In Everything 1.5, from the Tools menu, click Options.
  • Click the Keyboard tab on the left.
  • To the right of Show commands containing, search for:
    rand
  • Select: Result List | Select Random Result
  • Click Add....
  • Press a new keyboard shortcut (eg: Ctrl + R) and click OK.
  • Click OK.
Post Reply