I wonder if this is a recent bug.
On compiling, I get this.
"GetFileAttributesEx C:\Users\****\AppData\Local\Temp\arduino_build_135940: The system cannot find the file specified."
Never used to happen, just irritating.
It seems to happen after a couple of days of working on a sketch. All the other sketches in the same "instance" of the IDE are affected as well.
The solution is to save everything, close everything and start again.
Get a message on compiling of something like "archiving build etc." then all is well again, for a couple of days.
Probably been going on for a year or more. Not aware of changing anything.
A minor irritation, that's all
It's worth updating to the latest version of the IDE so see if it was caused by a bug that's already been fixed.
Just happened to me under IDE 1.8.5, so whatever the root cause, it's not fixed.
Which anti-virus software are you using?
I am leaning to Coding's suggestion and another McAfee or Norton victim.