Copy files from PocketPC to desktop computer?

G

George Ivanov

I need to copy files from Pocket PC device to desktop computer, is it
posssible any file access to br initiated from device to desktop?
 
S

Sergey Bogdanov

Well, there is no out of the box solution (as for example RAPI, for file
transfer from Desktop to PDA). However, there are several ways to
achieve it:

1. Install FTP server for desktop, then from your application use
OpenNETCF.Net.FTP [1] or [2];
2. By using HTTP Server (through PUT or POST method), see Alex Feinman's
example [3];
3. Use shared folder;
4. For desktop write a server application (socket based) then when PDA
is cradled it can comunicate with desktop through the known port.

[1] http://www.opennetcf.org/sdf/
[2] http://www.sergeybogdanov.com/samples/TestFTP.zip
[3] http://www.alexfeinman.com/download.asp?doc=HttpUpload.zip
 
J

Jeremy

The easiest (most error-prone?) way of doing it is using File.Copy(fromURI,
toURI); if you are accessing a network resource you will probably be asked
by the OS to enter your credentials.
 
G

George Ivanov

I have network share folder on Desktop computer, but how can I access it
from Pocket PC. The OpenFileDialog don't show it as option and am
accessing only folders of the device.
 
S

Sergey Bogdanov

This code snippet should work for you:

System.IO.File.Copy(@"\file", @"\\destination\destinationDir\file");
 
G

Guest

Gee... I shared a folder all the way and ran the code, but an IOException was
raised right away... Never thought such a simple idea worked. Did you get it
working this way ?
 
S

Sergey Bogdanov

Yep, it works for me. IOException could be thrown because file already
exists, try this instead:

System.IO.File.Copy(@"\file", @"\\destination\Shared\file", true);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top