How to Automatically Clear Temp Folder on Startup

This is a quick and easy way to clean out your temp folder, this folder can become very large and full of files that you don’t need, so we will create an batch file to clear this folder on boot-up automatically.

1. On your desktop create a new notepad document. There paste these 2 codes:

rd %temp% /s /q

 md %temp%

clear temp folder on bootup 2

2. Now go to File>Save As and save it with this name: %appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat

clear temp folder on bootup 3

The temp folder will clean it self on boot up and you wont even notice.


I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...