Script Commands for macOS Devices
Use the options and examples below to help you create your own powerful script commands.
Legend
| Format | Meaning | 
|---|---|
| text | Enter the command exactly as shown. | 
| text | Replace with the requested information. | 
| [text] | Information contained within square brackets is optional to the command. | 
| text|text | Choose one of the options separated by the vertical pipe. | 
Commands
| Command | Syntax | 
|---|---|
| cdChanges the current directory. | cd [directory]Example To change to the Chocolate directory: 
 | 
| copyCopies one or more files to another location. On Windows Mobile/CE and Desktop Classic devices, files can be copied between desktop computers and mobile devices. On Android devices, files can only be copied locally. | copy source destinationExample To copy all files with the extension .txt from the C:\ to the temp directory on the device: C:\tempt\*.txt 1:\temp | 
| delDeletes one or more files. | del filenameExample To delete example.txt in the current directory: 
 To delete all files with the extension .tmp in the current directory and its subfolders: 
 | 
| installInstalls an application on the device. | install appInstallerPathWhere appInstallerPath is the full path to the application installation file on the device Example To install the Team Viewer app whose installer is located on the desktop: 
 | 
| killTerminates a process that is currently running on the device. | kill executableExample To terminate the pword.exe process on the device: 
 | 
| logSends a customs message to the SOTI MobiControl deployment server from the device. This message appears in the Logs tab of the Device Information panel in the SOTI MobiControl console. | log type messageWhere  
 Example To send a notification to the SOTI MobiControl console at certain intervals during a software push: Note: Put the command in the pre-install script 
 | 
| mkdirormdCreates a new directory. | mkdir [drive:] pathExample To create a directory named "test" from the current directory: 
 To create  
 | 
| moveMoves a file from specified source location to specified destination location. Note: You can rename the file at the same time by specifying a name for the destination filename. | move [sourceFilePath] filename destinationFilePath [filename]Example To move the file test.bat: 
 
 To move and rename a file at the same time: 
 To move folder to root folder: 
 | 
| renameRenames a file or folder. | rename sourceFilename destinationFilenameExample To rename the file  
 | 
| resetPerforms a soft or hard reset of the device. | reset [/S] [/delaymin]Where 
 Example To soft reset a device in 3 minutes: 
 | 
| rmdirorrdDeletes a directory. | rmdir [/S] pathWhere  On Android Plus and Linux devices, this command requires the  Example To remove an empty directory named "test" from the current directory: 
 To remove a directory named "test" and all of its contents from the current directory: 
 To provide location: 
 | 
| setdateSets the date and time. | setdate date [time]Where  Example To set the date and time of the device 
 | 
| shellexecuteLaunches the registered application for the given file extension. | shellexecute filepath -verbWhere 
 Example To launch the registered application for the given file extension: 
 | 
| showmessageboxDisplays a message box on the device screen. | showmessagebox message [timer] [type] [NOTIFY_DEVICE]Where 
 Example To show a simple message: 
 To provide device information using a macro: 
 To set a 3 second timer to your message: 
 To add YES and NO buttons to your message box with no timer 
 | 
| sleepInitiates sleep mode on the device for a set period. Only use this command in scripts. | sleep [length]Where length is in seconds Example To set the device to sleep for 5 seconds: 
 | 
| writeprivateprofstringSaves or deletes specified settings on a device. See The writeprivateprofstring Command for more information. |