Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I do a file/folder copy in Windows CE 4.20 from the hard disk to an external location?

Posted on 2014-09-04
5
Medium Priority
?
2,761 Views
Last Modified: 2014-09-14
I'm trying to write a batch file that will copy files from the hard disk of a machine running Windows CE 4.20.  This machine cannot be hooked up to a PC running Active Sync for a number of reasons.  It has access to a network location, as well as an external USB thumb drive.

I'm looking for a command to copy the entire hard disk to either a network location or thumb drive.  When I open Windows Explorer, it doesn't give me your typical c:, d:, etc. drive numbers.  It says \Hard Disk for the hard drive and \Network for the network location.

I'm familiar with the copy commands and wasn't sure if copy c:\*.* \network location would work or if I would need to specify the hard drive differently.  I'd also want this job to run on a schedule, like anytime the machine is rebooted or shut down.

Does anyone have any experience with creating this batch file?
0
Comment
Question by:jmchristy
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:hjgode
ID: 40306065
if this a 'good' CE build you will have access to the "net" command. With that you can map a shared folder on any server/pc in the same network to the device:
net use mappingname \\server_pc\sharename 

Open in new window

will map the share 'sharename' of 'server_pc' to '\network\mappingname' on the device. See http://msdn.microsoft.com/en-us/library/ms931463.aspx.

As most CE builds do not support the use of ip addresses for smb, you need to have a working WINS name resolution. You may also set the server_pc ip address as WINS entry in the network card of the device and then use the name 'server_pc'. This is a proven solution in a network without a dedicated WINS server.

The net use command also supports accepting a user name, password and domain for the shared access.

The other way around, connecting from a PC to the device is not supported.

Windows CE does not use any drive letters. So the external drive is mapped as \Harddisk or similar. This is like Unix does drive mapping.

You can test the connection to a share using the device's file explorer and selecting 'Go To' or entering the location manually (depends on the file explorer, is OEM dependent). Just enter the share host and name as you would on a PC. In example: "\\hostname\sharename".
0
 

Assisted Solution

by:jmchristy
jmchristy earned 0 total points
ID: 40310414
I was able to do the drive mapping with the net command - that wasn't an issue.

The issue was with developing a batch file to copy all of my files from the hard disk to a network location.

I did figure out that the following command line will work - but it's not copying any subfolders.  Any thoughts?

copy "hard disk"\Folder\*.* \\networkserver\sharedfolder
0
 
LVL 16

Accepted Solution

by:
hjgode earned 2000 total points
ID: 40311216
The copy command was never able to copy sub directories. As there is no xcopy (AFAIK), you may use mortscript (http://forum.xda-developers.com/wiki/MortScript) or another scripting engine for wince to copy file recursively including sub folders, or write one yourself.
0
 

Author Comment

by:jmchristy
ID: 40311847
Thank you for confirming that with the copy command I will need to type each folder individually in my script.

Appreciate the help!
0
 

Author Closing Comment

by:jmchristy
ID: 40321499
My own comment provided the exact command for the copy from the hard disk.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question