Sample Header Ad - 728x90

Accessing iCloud Drive files via AppleScript

0 votes
1 answer
583 views
I am trying to get AppleScript to open a file located at iCloud Drive:Documents:Manuals:BBEdit_13.0.1_User_Manual.pdf.
tell application "Finder"
	open file "/Users/cb/Library/Mobile Documents/com~apple~CloudDocs/Documents/Manuals/Computer/BBEdit_13.0.1_User_Manual.pdf.icloud"
end tell
I obtained the filepath by right clocking the target file + option key & selecting copy... as filename. Running the script results in error
Finder got an error: Can’t get file \"/Users/cb/Library/Mobile Documents/com~apple~CloudDocs/Documents/Manuals/Computer/BBEdit_13.0.1_User_Manual.pdf\"." number -1728 from file "/Users/cb/Library/Mobile Documents/com~apple~CloudDocs/Documents/Manuals/Computer/BBEdit_13.0.1_User_Manual.pdf"
What am I doing wrong? Does anyone know what AppleScript error -1728 means?
Asked by bayswaterbill (3 rep)
Aug 9, 2023, 07:34 AM
Last activity: Aug 9, 2023, 08:34 PM