changing the project temp folder.

Is there a way to change the saved and Intermediate folder ? I use an application for sync the project in cloud, but those 2 folder always get modified and get unnecessary sync

I use perforce, the way we solved that is by not including those folders in source control.
This is how our hierarchy looks:


Thank for you answer,
I tried using the perforce once. The current install and use tutorials are pretty old. I will try again with perforce.