auto-config-banner
•
MACOS AUTOMATION
AUTOMATOR
IWORK AUTOMATION
•

The “Rename Devices” action

The Rename Devices action is used to rename a group of connected devices to have their new names follow a sequential pattern of a basename followed by a number, like: Tory Middle School 0236, Tory Middle School 0237, Tory Middle School 0238, etc.

Input:ECID Identifiers for the connected devices to rename
Output:ECID Identifiers for the connected devices that were renamed
Parameters:

User-settable parameters include:

  • The text to be used as the basename for all renamed devices

  • The starting number for the numeric sequence

  • The minimum number of digits in the sequence number (leading zeros)

  • The character (if any) to be used as a separator between the basename and numeric sequence number

The Action View

Note that the current parameter settings are reflected by a name example at the bottom of the action view.

The “Rename Single Device” action

DO THIS ► DOWNLOAD  the installer for the Rename Single Device Automator action.

Workflows executed upon attachment of iOS devices serve a special purpose and sometimes require specialized actions. A common task found in many attachment workflows is to rename the connected device based upon a forumla or data dynamically retrieved or generated.

To provide such flexibility, the Rename Single Device action is designed to accept one or more Automator workflow variables as the input for the device name. The variables can be dates, scripts, or any from the Automator variable library. They can also be mixed with provided text. The AppleScript and Shell Script variables (found in the Utilities category) are particularly useful for customization as the result of each script is used as its content passed to the name input.

Scripts in workflow variables can access information about the attached device through the environment variables listed on the attached workflows page.

Here is an example AppleScript script for retrieving the serial number (or other device information) from the attached device’s ECID property list file in the Cache folder. This script can be used within the Run AppleScript action or within an AppleScript workflow variable:

Retrieve Device Serial Number from Cache Property List (AppleScript)
  
01use framework "Foundation"
02use scripting additions
03 
04set thisECID to (do shell script "echo $ECID") as string
05set aPath to (the POSIX path of (path to "cach" from user domain)) & "com.apple.configurator.AttachedDevices/" & thisECID & ".plist"
06set aDictionary to current application's class "NSDictionary"'s dictionaryWithContentsOfFile:aPath
07set serialNumber to (aDictionary's valueForKey:"serialNumber") as text

(⬇ see below ) The example serial number retrieval script used in an Automator workflow variable:

begin-action

NEXT TOPIC: Installation Actions

TOPICS

  • Overview
  • Automator Quick-Start

  • Supervision Identity
  • Selection Actions
  • DEP Actions
  • Formatting Actions
  • Restore Devices
  • Erase Devices
  • Prepare Devices
  • Rename Devices
  • Backup Actions
  • Installation Actions
  • Information Actions
  • Configuration Utility Script Library
  • “Attached” Workflows

  • Workflow Recipes
  • iOS Classroom

DISCLAIMER

THIS WEBSITE IS NOT HOSTED BY APPLE INC.

Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. MACOSXAUTOMATION.COM assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. MACOSXAUTOMATION.COM provides this only as a convenience to our users. MACOSXAUTOMATION.COM has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and MACOSXAUTOMATION.COM assumes no responsibility in this regard. Please understand that a third-party site is independent from MACOSXAUTOMATION.COM and that MACOSXAUTOMATION.COM has no control over the content on that website. Please contact the vendor for additional information.