In order to run DOS command for clearing local temp files through Microsoft Power Automate Desktop, you need to add ’%’% to both sides of %TEMP% in your original command.
This is because the format of 2 % signs before and after (e.g. %Example%) represents a variable in Microsoft Power Automate Desktop, and it will recognise it as a variable data type. Without the additional ’%’% there will be an error that says “Variable ‘TEMP’ doesn’t exist”.
The resulting DOS command or application should read:
del /q/f/s %’%’%TEMP%’%’%\*
Running the flow will show that all local temp files have been deleted!