How do I delete files from my iCloud account and not have them deleted from my computer?

I'm trying to delete some old files from my icloud account but when I do, it deletes them from my computer. How do I delete from just the icloud without losing them on my computer.
how do I delete files from my icloud account and not have them deleted in my ...

On your computer, put the files you want to keep in a folder that is not being synced with iCloud.

Original thread: https://forums.imore.com/threads/how-do-i-delete-files-from-my-icloud-account-and-not-have-them-deleted-from-my-computer.302811/