Automated copy of checkout to mobile device

1799
5
04-13-2010 07:06 AM
AndrewZimba
Occasional Contributor
Hello all,

I am trying to make a single-button checkout and copy folder to device button utilizing ModelBuilder and Python. In order to copy the files to the device I am using a utility callec "CECopy.exe" from Microsoft available in their Windows Mobile Developer Power Toys (http://www.microsoft.com/downloads/details.aspx?familyid=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&displa...).

I can get the utility to perform correctly when I manually open a command prompt and enter the command and parameters; however, when I issue the same command the Python script, it simply does not work. In the same script immediately prior to the "cecopy" command, I issue an "xcopy" command which works perfectly, so it's not an issue of properly sending the command to the propmpt.

For background purposes, my desired workflow goes like this:
1. Check out axf from the geodatabase using an existing axf as a template for customizations
2. Use xcopy with the /d switch to copy background shapefiles, vbscript, and associated ArcPad (.apm, .apl, etc) files (but skipping the older .axf file used as a template) from a template folder to the folder where the current Arcpad checkout has been placed
3. Use cecopy to copy the entire folder where the current ArcPad checkout has been placed (now including the template files) to the currently connected mobile device <-- this is the step I can get to perform when interactively entered at the command prompt but not when fired from the script

Attached is a zip file of my script and toolbox model that fires it. If anyone has any advice please let me know ASAP!
Tags (3)
0 Kudos
5 Replies
AndrewZimba
Occasional Contributor
C'mon, no one else in the whole ESRI world does this??
0 Kudos
LledSmith
New Contributor III
I would use cecopy or RapiSync.  It is a very easy way to use arcpy to copy to a mobile unit.  But in the end it is not going to work because of system protocals/ IT restrictions 🙂
0 Kudos
LledSmith
New Contributor III
I would use cecopy or RapiSync.  It is a very easy way to use arcpy to copy to a mobile unit.  But in the end it is not going to work because of system protocals/ IT restrictions 🙂
0 Kudos
AndrewZimba
Occasional Contributor
You are probably correct, Lled, but my sysadmin swears it cannot be a system protocol issue because cecopy can be successfully executed under a user-initiated circumstances.  The problem only manifests when fired from within modelbuilder or a python script in ArcToolbox.  Double-clicking the same python script from explorer executes successfully, and firing the command directly from a user-initiated command window works as expected.

There obviously is some difference between firing a python script from arctoolbox and by double-clicking from explorer, and our protocols let one instance pass but stop another.  Hopefully a knowledgeable ESRI employee will be able to tell me what settings might have this effect, because I'm pretty sure our IT staff all the way up the chain will not be able to.
0 Kudos
LledSmith
New Contributor III
Hi Drew,
How time flys by....Did you ever get this to work?  Did you try exporting it as a python script and run it from the cmd?
cheers
Lled
0 Kudos