0

I am building a Windows Forms application using .Net 4.5.2 and I try to access the DCIM folder on external card on an Android phone. When I use Windows Explorer, the location is "Username @MachineName\Galaxy Phone Model\Card\DCIM". How can I access this path programmatically, ideally without the need of a third party library?

Nick_F
  • 1,103
  • 2
  • 13
  • 30

1 Answers1

1

If the card is exposed as a shell folder and not a drive letter then you need to use the shell namespace.

In native code this would be SHParseDisplayName and then interact with it with IShellFolder and/or IShellItem. IFileOperation to copy/move/delete.

If you don't want to P/Invoke you can use the Shell.Application COM object to parse the namespace of a folder path and then copy/move/enumerate...

Anders
  • 97,548
  • 12
  • 110
  • 164
  • Thanks Anders. I tried to use the Shell32 and I got to browse to the DCIM folder, but then I could not access the Camera folder. It is something more complex than what I was expecting. – Nick_F Aug 26 '22 at 11:47