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,280 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why use this lambda? 12 68
batch file or script 4 50
Starting to use Git with Visual  Studio Online 1 29
SQL Server Serialization error 8 16
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

696 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