Shortcuts
Every time I think I finally have a handle on Shortcuts’ bizarro scripting and even start verging on a bit of grudging respect, it does something entirely inscrutable that makes me hate it again.
I have a few Shortcuts that rely on txt files stored in iCloud>Shortcuts as global variable storage.
Recently, I was bored, so I decided to see about putting these into a csv instead. After about 20 steps (and more importantly, multiple multiple screens of oversized blocks), I go to save output as Test.csv. Result looks like a normal text file, open iCloud>Shortcuts, there’s Test.txt. Okay, run it again, same result. Delete Test.txt.
Okay, that’s just the extension, no big deal. New step: Rename “Saved File” as Test.csv. Result looks like a csv, yay. Open iCloud>Shortcuts, there’s Test.csv, yay again. Oh, there’s also Test.txt. That’s weird. Did I forget to delete the original failed test?
Delete both files, run Shortcut again, result looks good. Open iCloud>Shortcuts, Test.txt and Test.csv are both there.
Okay, fine. Shortcuts lives in bizarro world, so rename doesn’t behave like mv, it behaves like cp. I can just accept this. I’ll add a final step after rename to delete “Saved File.”
Run Shortcut. Huh, no result. That’s weird. Open iCloud>Shortcut. Oh, the contents of the entire directory have been deleted.