I've been asked to report on users who have iCloud Drive enabled.
I found an older EA on the board but that doesn't seem to work on El Cap even if I amend the file path.
This is what i'm using.
!/bin/sh
if folder exists, then iCloud Drive is enabled
iCloudDriveFolder="~/Library/Mobile Documents/com~apple~CloudDocs"
if [ -e "${iCloudDriveFolder}" ]; then
echo "<result>Enabled</result>"
else
echo "<result>Disabled</result>"
fi
Seems to be that the ~/Library/Mobile Documents/com~apple~CloudDocs isn't recognised using the above. I can cd to the folder and terminal sees it as a directory.
Now am i missing something or is it something else?
Thanks
Al



