Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I open a windows explorer window with a specific folder selected

Tags:

.net

vb.net

I have a winform application and this winform application has created few files. I want to implement "find target" function in my application to show those files. Those files located in a same folder. See the picture:

find target functionality as in windows xp

Let's say that I have created few files in "C:\Test\" folder and this folder has this file: "C:\Test\File1.txt". How to create "find target" functionality using VB.NET?

like image 648
user774411 Avatar asked Jun 30 '11 08:06

user774411


People also ask

How do I open a specific folder in Windows File Explorer?

Double-click on the shortcut, and Windows File Explorer will open to the folder you’ve specified. Windows File Explorer open on a specified folder. Click for larger image. (Screenshot: askleo.com)

How to open Second File Explorer window in Windows 10?

Just follow any one of the below methods to open a second file explorer window. 1. Use Keyboard Shortcut to Open a Second File Explorer Window. The easiest way to open second, third or any number of file explorer windows is to use the good old keyboard shortcut. When you want to open multiple file explorer Windows, just press the shortcut Win + E.

How do I create a shortcut to open a File Explorer?

Once you find the executable file (explorer.exe), right-click it and navigate to the Create Shortcut menu item. The system will locate the new shortcut file to your Desktop by default. If you double-click that shortcut it will open File Explorer in Quick Access as it did before.

How do I open a new file in Windows 10?

While in File Explorer (Win+E), select one or more folders, libraries, and/or drives. (see screenshot below) 2. Click/tap on the File tab on the menu bar, and: A) Click/tap on Open new window.


1 Answers

Use Process.Start() to start the Windows Explorer:

Process.Start("explorer.exe", "/select," & "FILETOSELECT")

With the /select, [file] parameter, you can highlight the file.

like image 99
Rhapsody Avatar answered Sep 17 '22 17:09

Rhapsody