简体   繁体   English

如何从 Windows 文件资源管理器中选择文件

[英]How to select a file from windows file explorer

Is there a way to use ShellExecute and grab the file (or rather the file path) and save it in a variable upon selecting it?有没有办法使用 ShellExecute 并获取文件(或者更确切地说是文件路径)并在选择它时将其保存在变量中?

Should I use a different function all together?我应该一起使用不同的功能吗?

I've looked at some of the other similar functions for opening the windows file explorer and all of them need a path first, before opening the window.我已经查看了一些其他类似的用于打开 windows 文件资源管理器的函数,在打开窗口之前,所有这些函数都需要一个路径。

ShellExecute(NULL, L"explore", NULL, NULL, NULL, SW_SHOWNORMAL); 

My goal is to open the file explorer (like ShellExecute does) and select one file, plug the path of that file into a variable and do a thing with it later.我的目标是打开文件资源管理器(就像 ShellExecute 那样)并选择一个文件,将该文件的路径插入一个变量中,然后再用它做一些事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Qt如何防止将项目从应用程序拖放到Windows File Explorer - Qt How to Prevent dropping item FROM application TO Windows File Explorer 如何从 C++ 程序运行文件资源管理器并在 Windows 上仅显示某些文件? - How to Run File Explorer From C++ Program and Show Only Certain Files on Windows? Eclipse:如何从Project Explorer隐藏文件? - Eclipse : How to hide a file from Project Explorer? 如何从 Qt 打开文件资源管理器? - How to open a file explorer from Qt? 如何挂钩windows7 explorer.exe来隐藏文件 - How to hook windows7 explorer.exe to hide file 在XP上使用Windows文件资源管理器时,停止打开explorer.exe任务栏 - Stopping the explorer.exe taskbar from opening when using the windows file explorer on XP MFC CListCtrl拖动文件到Windows资源管理器 - MFC CListCtrl drag file to Windows Explorer C ++如何在Windows资源管理器中使文件类型像zip文件一样“可打开” - C++ How to make a file type “openable” like a zip file in Windows Explorer 是否可以将数据从 gtk 应用程序拖到 Windows 下的其他应用程序? 像文件资源管理器? - Is it possible to drag data from a gtk app to other application under Windows? Like File Explorer? Pismo File Mount如何将ZIP文件安装到Windows资源管理器中? - How does Pismo File Mount mount ZIP files onto Windows Explorer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM