• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Instructions on how to automatically delete temporary files on Windows 11

AnonyViet by AnonyViet
September 16, 2025
in Tips
0

Windows 11 is a powerful operating system, but after a period of use, temporary files can accumulate and occupy storage space, slow down computer performance. Job Automatically delete temporary files on Windows 11 Not only helps save capacity but also improves the operational speed of the system. In this article, we will explore the methods to automate this deletion process!

Join the channel Telegram belong to Anonyviet 👉 Link 👈

Why automatically delete the temporary file on Windows 11?

Temporary file The files are created by the operating system and applications to support the temporary operation process, such as software settings, system updates or temporary data storage. However, when not cleaned regularly, they can:

  • Occupy the hard drive space because the temporary file can occupy the GB of capacity, especially if you use the computer regularly.
  • These files may affect the processing speed of the system.
  • The temporary file is no longer needed to mess the drive.

The automatic deletion of the temporary file Windows 11 Help you save time compared to manual deletion, while ensuring the system is always neat and smooth operation.

Why automatically delete the temporary file on Windows 11?
Why automatically delete the temporary file on Windows 11?

Tell you 2 ways to automatically delete the temporary file on Windows 11

Method 1: Use script

Step 1: Create a temporary file to delete files

One of the most effective ways to automate the temporary file removal is to create a script batch and schedule it through Task Scheduler. Here are the detailed instructions:

1. Press the key combination Windows + S, enter Notepad and open the application.

2. Copy the code below into Notepad:

@echo off
echo Cleaning system and user temp files...
del /s /f /q %TEMP%\*.* >nul 2>&1
rd /s /q %TEMP% >nul 2>&1
md %TEMP%

del /s /f /q C:\Windows\Temp\*.* >nul 2>&1
rd /s /q C:\Windows\Temp >nul 2>&1
md C:\Windows\Temp

echo Temporary files cleared!

3. File> Save as > Select the archive folder (for example: Desktop). In the Save as type, select the format All Files. Name the file Cleartempfiles.bat (.Bat extension is very important)> click Save.

Name the file is Cleartempfiles.bat
Name the file is Cleartempfiles.bat

This script will delete the temporary files in the folder %Temp% user and folder C: \ Windows \ Temp of the system.

Step 2: Schedule a script running with Task Scheduler

1. Click Windows + Sfind Task Scheduler and open the application.

2. In the right bar, select Create basic task > Name the task, for example: Delete the automatic file, then press Next.

Select Create Basic Task
Select Create Basic Task

3. Select the frequency of running:

  • Select Daily To delete the file temporarily, then press Next.
Select Daily to delete the file every day
Select Daily to delete the file every day
  • Select Date and time begins (Example: 2:00 AM), then click Next.
Choose date and time start
Choose date and time start

4. Select the item Start a programthen click Next.

In Program/Script, Enter the path Fully to Cleartempfiles.Bat file (for example: C: \ Users \ Yourusername \ Desktop \ ClearMPFILES.BAT)> Click Next.

Enter the full path to the file cleartempfiles.bat
Enter the full path to the file cleartempfiles.bat

5. Open the Properties Dialog for this task when I Click Finish > Press Finish.
In the new window, accumulating Run with highest privateges To make sure the script runs with administrative rights> press OK.

From now on, Task Scheduler will automatically run the script at the set time, helping you delete the temporary file without manual intervention.

Accumulate with Run with Highest Privileges
Accumulate with Run with Highest Privileges

Step 3: Customize the script to delete other types of files

If you want to expand the ability to clean, add the following commands to the script:

Delete the trash (Recycle bin):

PowerShell.exe "-Command Clear-RecycleBin -Force"

Deleting the cache (cache) of Windows Update:

net stop wuauserv
rd /s /q C:\Windows\SoftwareDistribution\Download
net start wuauserv

Delete Prefetch file:

del /s /f /q C:\Windows\Prefetch\*.* >nul 2>&1

Run the script when booting or turning off the phone

If you want a script to run when booting or turning off, follow these steps:

Run when booting

  1. Open Task Scheduler > Right -click on the task of deleting the file automatically, select Properties.
  2. Into the tab Triggerspress New > In the Begin The task section, select At startup > Click OK to save.
Select At Startup
Select At Startup

Run when shutdown (Windows 11 Pro)

  1. Press Windows + Renter GPEDIT.MSC and click Enter.
  2. Access Computer Configuration> Windows Settings> Scripts (Startup/Shutdown).
  3. Double click Shutdown to the right> select Addadd the cleearempfiles.bat file, then click OK.

Note: This feature is only available on Windows 11 Pro, not applicable to the Home version.

Select Add, add ClearTempfiles.Bat
Select Add, add ClearTempfiles.Bat

Method 2: Use Storage Sense

In addition to Script, Windows 11 provides Storage Sense to automatically clean the file. Although not as flexible as script, this is an integrated solution, easy to use.

  • Press Windows + I To open the Settings application> Select System From the left bar.
  • On the right, choose Storage > Activate the switch Storage Sense.
Activate the Storage Sense switch
Activate the Storage Sense switch
  • In the item Run Storage Sensechoose the frequency of running (for example: every week).
  • Accumulate the options as Delete files in my recycle bin or Delete files in my downloads folder necessary.
  • Press Run Storage Sense Now To check immediately.

Storage Sense will automatically delete the temporary file according to the schedule you choose, but it cannot customize the details as the script.

Storage Sense will automatically delete the temporary file according to the schedule you choose
Storage Sense will automatically delete the temporary file according to the schedule you choose

Conclusion

Automatically delete temporary files on Windows 11 A great way to keep your computer always clean and effective. By using Script Bank in combination with Task Scheduler or taking advantage of the Storage Sense feature, you can easily remove unnecessary files without much effort. Try applying these methods today to optimize the system!

Tags: AutomaticallydeletefilesInstructionstemporaryWindows
Previous Post

Instructions for restoring old photos with Ai Gemini Nano Banana

Next Post

How to receive 1 year Gemini Advanced free, Bypass verify sheerid

AnonyViet

AnonyViet

Related Posts

How to change the default font on Windows 10
Tips

How to change the default font on Windows 10

April 13, 2026
5 tips for using a Browser to replace an App (helps save RAM, time and money)
Tips

5 tips for using a Browser to replace an App (helps save RAM, time and money)

April 13, 2026
How to make funny MeMe photos without Photoshop within 10 seconds
Tips

How to make funny MeMe photos without Photoshop within 10 seconds

April 11, 2026
How to quickly design your own Logo without Photoshop
Tips

How to quickly design your own Logo without Photoshop

April 10, 2026
How to convert Website into App on Windows
Tips

How to convert Website into App on Windows

April 9, 2026
Instructions for getting 3 months of Adobe Express Pro for free
Tips

Instructions for getting 3 months of Adobe Express Pro for free

April 9, 2026
Next Post
How to receive 1 year Gemini Advanced free, Bypass verify sheerid

How to receive 1 year Gemini Advanced free, Bypass verify sheerid

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

April 20, 2026
4K Video Downloader Plus – Tool to download YouTube videos on macOS

4K Video Downloader Plus – Tool to download YouTube videos on macOS

April 20, 2026
How to add Watermark to Google Docs to protect copyright

How to add Watermark to Google Docs to protect copyright

April 19, 2026
How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

April 20, 2026
4K Video Downloader Plus – Tool to download YouTube videos on macOS

4K Video Downloader Plus – Tool to download YouTube videos on macOS

April 20, 2026
How to add Watermark to Google Docs to protect copyright

How to add Watermark to Google Docs to protect copyright

April 19, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

Japanese Watch Week: Choose the color that suits your destiny, start the new year well at Mobile World

April 20, 2026
4K Video Downloader Plus – Tool to download YouTube videos on macOS

4K Video Downloader Plus – Tool to download YouTube videos on macOS

April 20, 2026
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply