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
2,470 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

628 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