Copying folders with the function copyFolder from MDM Zinc doesn’t show the same behavior on Mac as it does on PC.

On PC the content of the folder is also copied, on Mac this isn’t the case. On mac only the folder itself is copied, but not the contents. It’s rather annoying as you would expect the same behavior be programmed by MDM.

If you want the same behavior on Mac then you better use some AppleScript.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var shellScript:String = "tell application \"Finder\" \r" + 
    "duplicate \"" + copyFrom + "\" to \"" + copyTo + "\" \r" + 
    "end tell";
trace("EVAFRAMEWORK :: ZincSystemService.as : Executing shellScript : " + shellScript);
 
mdm.AppleScript.setScript(shellScript);
if(mdm.AppleScript.compileScript())
{
    trace("EVAFRAMEWORK :: ZincSystemService.as : Script Compiled Successfully");
    if(mdm.AppleScript.run())
    {
        trace("EVAFRAMEWORK :: ZincSystemService.as : Script Runned Successfully");
    }
    else
    {
        trace("EVAFRAMEWORK :: ZincSystemService.as : Run Error : " + mdm.AppleScript.getLastError());
    }
}
else
{
    trace("EVAFRAMEWORK :: ZincSystemService.as : Compile Error : " + mdm.AppleScript.getLastError());
}

To move a folder, there’s no function available in Zinc, so you need to copy and delete. The function deleteFolder from Zinc does have the same behavior on Mac and PC.

pixel Copying folders on Mac & Pc With MDM Zinc
No TweetBacks yet. (Be the first to Tweet this post)