compiling error message

Trying to compile a previously working sketch, I continually get the following error message:

c:\programfiles\windowsapps\arduinollc.arduinoide_1.8.10.1x86_mdggnx93n4wtt\hardware\tools\avr\bin../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe:unable to rename 'core\core.a';

exit status 1

Error compiling for board Arduino/Genuino Mega or Mega 2560

Advice please

Try restarting the Arduino IDE.

Thanks for the thought,
I have already tried restarting the IDE and have even uninstalled it completely and re-installed it to no avail.
Mike

This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.