Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Locate Directory on Hard disk....

Posted on 2006-05-11
3
Medium Priority
?
248 Views
Last Modified: 2010-04-16
I am looking to "locate file in folder", I have the Directory Path, and filename, how would I open windows explorer the that folder with that filename highlighted?
0
Comment
Question by:addicktz
3 Comments
 
LVL 19

Assisted Solution

by:Fahad Mukhtar
Fahad Mukhtar earned 800 total points
ID: 16665302
System.Diagnostic.Process.Start(DirectoryPath)
will do the half job

0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1200 total points
ID: 16665322
Use the "/select" switch for explorer.exe:

        private void button1_Click(object sender, EventArgs e)
        {
            String fileName = @"C:\Documents and Settings\Michael\My Documents\someFile.txt";
            System.Diagnostics.Process p = new Process();
            p.StartInfo.FileName = "explorer.exe";
            p.StartInfo.Arguments = @"/select," + fileName;
            p.Start();
        }
0
 
LVL 1

Author Comment

by:addicktz
ID: 16665459
i love you guys *tear*
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question