I think it was ".nosync" and ".tmp"
https://forum.keyboardmaestro.com/t/exclude-files-folders-fr...
Also "Bailiff":
"Bailiff is a simple menubar app which lets you evict iCloud files and folders from local storage, or download them when you want. Saves your Mac’s startup disk from getting cluttered with files you don’t want or use."
https://eclecticlight.co/downloads/
At least if it was by creating an empty file with that name.
Also iCloud Drive's synching has been an utter mess and I gave up after nothing syncs at random times.
That's not very nice. I'm just trying to help and that seems to be the only thing that seems to be working.
I don't work at Apple, so...
https://forum.keyboardmaestro.com/t/exclude-files-folders-fr...
Also "Bailiff":
"Bailiff is a simple menubar app which lets you evict iCloud files and folders from local storage, or download them when you want. Saves your Mac’s startup disk from getting cluttered with files you don’t want or use."
https://eclecticlight.co/downloads/