Using FolderBrowserDialog on a Removable Device / Removable storage

前端 未结 3 1641
刺人心
刺人心 2021-01-19 10:01

I\'m working on a simple copy tool to copy files off digital cameras. I\'ve written the file copy code, I\'ve got everything hooked up nicely.

The issue I have seems

相关标签:
3条回答
  • 2021-01-19 10:43

    Where did you get the path from? From the address bar in Explorer? This doesn't display the file system path, but a "user friendly" representation of it.

    To get the path, right-click the address bar, and choose "Copy Address as Text" or "Edit Address".

    0 讨论(0)
  • 2021-01-19 10:47

    My guess would be that the location doesn't have a file system representation (path) such as c:...\my camera.

    You should be able to get the PIDL of the folder, (it should be one the the flags for the function), and implement the copy using the COM shell interfaces.

    SHBrowseForFolder

    Using PIDL to enumerate a folder

    0 讨论(0)
  • Is there a way to map the camera path to a drive letter? (I'm thinking something like "subst" or "net use" from a command prompt.) Maybe that would fool the FolderBrowserDialog into behaving as desired?

    0 讨论(0)
提交回复
热议问题