As an old Windows user, you definitely know what a recycle bin is, yes, the recycle bin is the place where the files we delete are located, as long as the files are not permanently deleted (Shift + DEL) the files will be stored in the Recycle bin.
As long as the file is in the Recycle bin, we can restore the file to the place where the file was before it was deleted and the restored file can be used again.
For some cases, storing files that have been deleted in the Recycle bin can indeed benefit us if the deleted files are accidentally deleted, while for files that we really want to delete so that the computer size is more spacious, of course this feature is quite detrimental, especially if we forget to empty the stored file.
That's why I made this tutorial for those of you who are sure when you delete useless files and often forget to empty the Recycle bin. Because in this tutorial I will provide an automatic way that can empty data in the Recycle bin every time we turn off the computer.
Below is how to do it
- File.bat
We start from the first method, which is to create a new file.bat containing the command for powershell
- PowerShell.exe -NoProfile -Command Clear-RecycleBin -Confirm:$false
We start from the first method, which is to create a new file.bat containing the command for powershell
After we finish pasting the code above, then we save as notepad using the CTRL + S or CTRL + SHIFT + S shortcut then a window (Box2) will appear as shown above to determine the path, name and extension (Box3) for the extension, make sure you write . bat.
- Adding code
Okay, now the file has been created, the next step is to open an application that will execute the file when windows is turned off that is the Group Policy Editor, which you can open by typing gpedit.msc in windows run(box1).
Windows 10 Home
For those of you who use windows 10 home edition like me, maybe you can't use the Group Policy Editor but I've solved this problem and wrote it through this article.how to add group policy editor windows 10 home
The article above will solve your problem and make gpedit open
If the Group Policy Editor is already open, then you look for a script that you can look for in Computer Configuration > Windows Settings > Scripts then you click shutdown (box1) until a pop up appears as shown below
Next we click the add button (box2) to add the code that we created.
After clicking the add button, a new screen will appear as shown above, we click on the browser (box1) to search for the code that has been created. After the code we created earlier is selected (box2), the next step is to click open (box3), the last is to click ok (box4), the settings have been saved.
Please turn off your computer, you will see the recycle bin has been emptied.
Okay, here's the tutorial this time, if you want to stop this method, you just need to remove it. If you have any questions please comment below.
0 Komentar