Force Download from iCloud

I want to run an App on a file currently in iCloud.

I've tried several methods that will tell me it's not found, but I have not been able to make sure a file is available in AppleScript or shell or KM (sort of like "right click - 'Download Now').

This must be a common issue, so what have you done about it?

Thanks!

I have a similar issue with (large) Google Drive files available locally through the Google Drive app.

My solution was to effectively "read" the file to force the entire file to be downloaded.

In the example below, the filename (including full path) is in the KM variable SermonRawImagePath, and thus used in the shell script as $KMVAR_SermonRawImagePath

This works to force the download, and the file will be fully downloaded when this shell script completes.

I'm still learning KM myself, so I'd appreciate any better or more elegant solutions.

Hey John,

  • Welcome to the forum!  :smiley:

I was going to suggest using KM's Read a File action, but then I tested it on a PDF file – and it balked with file-encoding issues.

This is yet another illustration of the superiority of tested facts over untested theories – i.e. why even experienced users need to test, test, test, and not just talk...  :sunglasses:

So – at least for now your solution appears to be the most elegant.

One reminder – local Variables are often more efficient than global ones, since there's no housekeeping necessary.

-Chris

Ha, sounds like you don't want to be a CONSULTANT, @ccstone. :rofl:

I'll put on my MANAGER hat and suggest that @John_Har tests touch. I suspect that it won't work, but it's probably worth a quick test.

1 Like

@_jims Tested "touch" but it only updates the access/modify time. It doesn't trigger a download of the file. That's inline with my expectations of how these cloud file apps only download if you need to read/write the file content.

@ccstone Thanks for the reminder. I'm intentionally using global variables here because, long story short, I need to be able to resume a complex automation macro from any point of failure.

2 Likes