6

Imagine I have a file in iCloud Drive/Sounds/Foo.mp3. I want to play it via the Play sound action in the Shortcuts app.

I need to use Get File. When I use Get File I can choose the iCloud Drive service, but then if I want to hardcode the sound file to play, it asks me to manually enter in the path starting with /Shortcuts/.

I tried entering /Shortcuts/Sounds/Foo.mp3 and /Shortcuts/Sounds/Foo, but both said:

The file doesn't exist.

The file "Foo" couldn't be opened because there is no such file.

How do I specify a path to a file in iCloud Drive in the Shortcuts app?

3
  • Are you sure about the paths starting with / ?
    – nohillside
    Dec 12, 2019 at 16:27
  • @nohillside I think he is talking about iOS.
    – amdyes
    Dec 13, 2019 at 7:07
  • 1
    @amdyes The question is tagged "macos".
    – nohillside
    Dec 13, 2019 at 7:09

2 Answers 2

7

From an OSXDaily article, "How to Access iCloud Drive from Command Line in Mac OS," from 2017, the answer appears to be ~/Library/Mobile\ Documents/com~apple~CloudDocs/.

Checked it just now and this works for me as of December 2021.

I know I will forget this, so will make a symlink to it from my home directory!

1
  • For convenience you can create a symbolic link anywhere you like, e.g.: "ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs ~/iCloudDrive"
    – kgriffs
    Mar 19 at 17:02
0

If you go to the Files app, you'll notice that there is a folder located at the root of your iCloud Drive called Shortcuts. You must move your file from /Sounds/Foo.mp3 to /Shortcuts/Sounds/Foo.mp3, it appears that the Shortcuts app cannot read files that aren't located inside the /Shortcuts/ folder.

1
  • This is a helpful answer to the original questioner, but it isn't responsive to the question that was asked, which is about pathnames of files in iCloud. Dec 21, 2021 at 17:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .