TIPS - Clear temp with DOS command

Summary

Clear temp with DOS command

Body

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!

Details

Details

Article ID: 9061
Created
Mon 11/6/23 12:14 PM
Modified
Mon 11/6/23 12:14 PM