Show File in Explorer?

Just starting out? Need help? Post your questions and find answers here.
Randy Walker
Addict
Addict
Posts: 1078
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Show File in Explorer?

Post by Randy Walker »

I can open the Windows Explorer to the path I want but how to make it highlight an item in file list? That is the question. As an example if you search for a file using "Everything", right click an item and select [Open path] it will open the Windows Explorer with that item highlighted. How do they do that?
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
BarryG
Addict
Addict
Posts: 4194
Joined: Thu Apr 18, 2019 8:17 am

Re: Show File in Explorer?

Post by BarryG »

Code: Select all

file$="c:\windows\regedit.exe"
ShellExecute_(0,"open","explorer","/select,"+file$,GetPathPart(file$),#SW_SHOW)
Randy Walker
Addict
Addict
Posts: 1078
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: Show File in Explorer?

Post by Randy Walker »

BarryG wrote: Sat Sep 20, 2025 4:21 am

Code: Select all

file$="c:\windows\regedit.exe"
ShellExecute_(0,"open","explorer","/select,"+file$,GetPathPart(file$),#SW_SHOW)
That's fantastic. Thank you barryG! ! !
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
BarryG
Addict
Addict
Posts: 4194
Joined: Thu Apr 18, 2019 8:17 am

Re: Show File in Explorer?

Post by BarryG »

Happy to help. :)
Post Reply