Click here to Skip to main content
13,005,644 members (65,544 online)
Rate this:
Please Sign up or sign in to vote.

I want to open a directory ( like "E:\\" ) in an open window,
I mean that I want to change a window navigation address in windowsExplore.exe,

for example i have a window open that shows "D:\\new folder" and I want to change its address to "E:\\",

I know this code

but this code opens a new window... I want to change not open a new window.
Posted 4-Sep-12 7:15am
Updated 4-Sep-12 7:22am
If you think a bit about it, you will see that there is no such thing as "open a directory" -- this is no more than some metaphor common for some types of applications, such as file managers. By some reason, your code really opens a new window, but it's not just a window, this is a window of Windows "Explorer" application. To get some help, you really need to realize all that and explain what you want to achieve, otherwise this question makes no sense.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

AFAIK, what you are trying to do is not possible this way. This is not how Process.Start works.

A folder is not a process that can be 'started'.
Sandeep Mewara 4-Sep-12 15:50pm
You cannot do it. You need an event to do it. URL's are executed and directed to other ones by same web app. External applications can launch a new URL but cannot change existing windows one from security perspective. Think if it was allowed, how viruses and male-ware would do with our open windows.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I don't know a way to change navigation bar value, but you can open directory using

System.Diagnostics.Process.Start("explorer.exe", @"/select, " + fileName);

If you don't want to select a file just replace @"/select, " with "".filename represents location of file or folder.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100