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?
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
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...
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.
@_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.