views:

46

answers:

2

I have run into a problem with a couple of the "Sync" applications I wanted to create. In both instances, I am trying to connect a Portable Device to my computer and access it using VB.NET. One application would pull the pictures in from my camera, rename them, and put them in folders according to their date taken. The other would place the podcasts I have downloaded onto my Mp3 Player. I have the logic for both so that if I run it on two Windows directories, for example (C:\Source and C:\Destination) but when I try to access the Portable device using a directory browser, the "OK" button is disabled. Is there any way to access the directories on such a device?

Thanks in advance!

A: 

If you wanted to copy or move directly from one folder to another, you could try

System.IO.File.Copy("C:\Source\somefile.txt", "C:\Destination\somefile.txt")

or

System.IO.File.Move("C:\Source\somefile.txt", "C:\Destination\somefile.txt")

I'm afraid I don't know anything about directory browsing, however. Hope that helps you out a bit.

Auguste
A: 

The way that I ended up doing this was changing the settings on my MP3 player to use MSC mode instead of the default MTP. The computer then recognized it as a portable drive and assigned it a drive letter. I was finally able to move the files as needed. I haven't tried this with my camera yet, but will be trying that soon.

Jeremy S