在打开的窗口中打开目录 [英] opening a directory in an opened window

查看:122
本文介绍了在打开的窗口中打开目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我想在打开的窗口中打开目录(例如"E:\\"),
我的意思是我想在windowsExplore.exe中更改窗口导航地址,

例如,我有一个打开的窗口,显示"D:\\ new文件夹",我想将其地址更改为"E:\\",

我知道这段代码

Hi...

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

System.Diagnostics.Process.Start("E:\\");


但是这段代码会打开一个新窗口...我要更改为不打开一个新窗口.


but this code opens a new window... I want to change not open a new window.

推荐答案

AFAIK,您尝试这样做的方式是不可能的.这不是Process.Start的工作方式.

文件夹不是可以启动"的过程.
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''.


我不知道更改导航栏值的方法,但是您可以使用
打开目录
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);



如果不想选择文件,只需将@"/select替换为".文件名表示文件或文件夹的位置.



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


这篇关于在打开的窗口中打开目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆