Clear out those Junks !!


Hello !! 

Let's see something interesting today. Who doesn't fantasizes about using a super-fast computer? I am not going to explain to you the use cases of computer and bore you down. We all know what it is and what it is capable of doing. But having a computer that is capable of doing something really fast is what we desire.

Don't worry. It's not going to be too technical. I will explain to you step by step with screens. 

Clearing temporary files …

Wait !! What? Will clearing a temporary file speed up my system? – Yes. For this to be made clear, let us first understand what is a temporary file, how this is getting accumulated in the system, and how does it impact our system's performance.


What is a Temporary file?

Temporary files are also known as "foo" files. These files are created by our operating system when we are running a task on our systems. These files are needed when we use any programs or applications. These files serve as a temporary memory to work on the applications.  

How is this getting accumulated in our System?

For example, using any Windows program will create a file with a ".tmp" extension. This is one type of temp file and MS Word may create a hidden file with ~ and $ symbol (i.e. $common.doc) in the same directory as the document is the other type. Why do these temporary files are also called for files? – Linux Operating System will create a temporary file with .foo extension.

Is it safe to delete these files? 

Absolutely "YES". Yes. These files are meant to store something temporarily and do not rely on the actual information we store in a file. But we must be so careful while deleting temp files for the programs in use. However, we must also know that most of the programs lock their temporary file thus preventing it from getting deleted. Even a few go a step further to flush away these temp files once their job is done. Temporary files will be recreated when the program or file is opened again.

How will temp files impact the performance?

Overtime when these temporary files get accumulated in the system, it eats up the memory. This could even lead to exhausting our storage. When the storage of our computer goes down, the system performance also degrades.

There are quite a few methods to get rid of these temp files. Let's see these methods in action.

Method 1- Deleting manually

Step 1: Just press Windows+R on the keyboard. This should open the Run command and type "%temp%' in it.

 


Step 2: This should open up the below file path 

C:\Users\Your_PC_Name\AppData\Local\Temp

Step 3: Delete or Shift+Delete. What's the difference here?

Delete will delete the temp files and move them to the Recycle bin whereas Shift+Delete will permanently delete these files. Your deleted files will not be found in the Recycle bin too.

The con here is that every time you have to follow these steps to delete those files.


Method 2:

Going by the Windows method. There are actually a couple of ways that Windows helps us in removing these files.

Windows Method 1: - Recommended for Win Vista / Win 7

Press the Win key and type "Disk Cleanup" It is an inbuilt application provided by Microsoft Windows.

It prompts us a new pop up


All drives within your computer will be listed here. You can choose any one of those. Once you select the drive, Choose the types of files to be cleaned up and click on "Clean up system files". Note that you might require admin rights to perform this action.




Windows Method 2: Recommended for Windows 10

Windows 10 has a feature to automatically clear out the recycle bin, downloaded folders, and temporary files including Internet-related files. Let us see how to do it.

Press the Win key and type "Settings".

Select "System" within Settings.



Select "Storage" within the below Option



You can do either of the below

Turn on the Storage Sense – Doing this will automatically free up the unwanted files or temporary files and content within the recycle bin

Or "Configure Storage Sense or run it now" option below the Storage Sense toggle and below screen pops up.

You can configure settings to clear out temp files on a particular frequency or even configure to delete files that are in the download folder for a long time.

If we need to clean up space immediately then click on "Clean now". When we click this, it will make a decision on unwanted files by itself and will clear temp files.

Method 3: How about doing it programmatically?

Sometimes we might not want these files to be cleared either manually or in a defined frequency. We can run some batch script to accomplish this task at an expense of double-click.

Step 1: Create a Notepad.

Step 2: Copy the below content to the notepad.

rd %temp% /s /q

md %temp%

rd /s /q %systemdrive%\$Recycle.bin

The First 2 lines will clear temp files and the third line will clear Recycle Bin.

Let me explain the script here. 

"rd" – denotes remove a directory.

"%temp%" – denotes the temp files path in the system

"/s" – denotes to do the same for all sub-folders within the temp path.

"/q" – denotes 'Don't' prompt me for anything and do it by yourself'

"/f" – Include all read-only files in deletion.

Now since we have understood the program, let's see how we can execute it with just a double-click.

After copy-pasting the above code, go to "File->Save As-> FreeMe.bat". Here the extension is important. It must be the ".bat" file and you are free to name it anything. 

That's it. Double-click this file and it should clear contents within the Temporary folder and Recycle bin. 

If you don't want to clear the recycle bin every time just remove the third line.

Note: Right-click the bat file and click on "Run as Administrator"

Method 4: How about making this program to run during every start-up instead of even double-clicking? 

After creating the batch file as in Method 3, place this batch file in the below path. 

"%appdata%\microsoft\windows\start menu\programs\startup\FreeMe.bat"

This path can be opened by copy-pasting the below path in the "Run" command (Win+R)

"%appdata%\microsoft\windows\start menu\programs\startup\"


Just restart your system and see the magic. But be very careful that this will run on every reboot of your system and will keep clearing your temp files and recycle bin every time. Choose this method wisely when the content inside Recycle Bin is sure to be discarded whenever we boot up the system.


Thanks for reading !! 


Watch it in action in English -



Watch it in action in Tamil -




Comments