Windows: "Clean" The Computer Through The Command Line To Run In The CMD Console.

While I was writing my previous article "⚠ ⚠ Hackers + Malware + Windows = Cryptocurrency Mining ⚠ ⚠", I thought about adding a command line at the end to run in the Windows CMD console (I don't know if anyone still uses it πŸ˜€πŸ˜€πŸ˜€) , to "clean" the computers with this operating system a little. I admit that I later forgot it, that's why today, in payment of that debt to myself (and of course to you), I decided to write this short article.

It happens that nowadays, computers store a large amount of data, such as files, programs, images and videos, which can cause storage space to run out and/or unwanted files accumulate, which can slow down the performance of the computer. . The other big problem is the number of hidden files and files that Windows has where viruses, malware, harmful scripts, etc. are generally hosted.

It is true that to free up space on the computer, unhide files and repair the computer there are various tools and methods, but personally, I consider it more satisfying to do things by yourself because in one way or another it helps us to better understand the systems with those of us who work. The command line that I propose will perform the following operations:

βœ” Close Windows Explorer (function: taskkill), so you will only see the console working.

βœ” Free up space in operational memory.

βœ” Remove the "hidden" attribute from all folders and files on your computer on all drives (this takes a while).

βœ” Delete unnecessary folders and files (bak, autorun, shs, gid, chk, temp, tmp).

βœ” Defragments all computer drives.

βœ” When finished, open Windows Explorer

The steps: The first thing you should do is copy the code into any simple text editor (it can be done from Notepad itself), then save it with the name you want (Example: CleanPC.txt), change the file extension. txt that you created with .bat, CleanPC.bat would remain (the icon changes to a command prompt). Finally, right clic on the file, go to "Run as Administrator", press Enter and wait patiently (very patiently πŸ˜€) for the script to complete.

Note: If you want to interrupt the process before it finishes, close the command window, press Ctrl + Shift + Esc keys, the "Task Manager" will open, clic "File", clic "Run New Task", A window will open, type: explorer and accept or execute Enter.

taskkill /im explorer.exe /f

@color f9
@mode con cols=140 lines=25
@prompt $h
@title "Clean PC by CryptoEntrepreneurs"
@echo off
@set LBRAM=0
@set cont=0
@set fin=0
@echo MYSTRING = (80000000)>Memory.vbe
@start Memory.vbe
echo Releasing Working Memory
echo %sub% Percent Complete
set sub=0
echo Releasing Memory operativa
echo %cont% Percent Complete
@set/a LBRAM="%LBRAM% + 1"
@set/a cont="%LBRAM% / 10"
@if "%LBRAM%"=="1000" goto :B
@goto a
@if exist Memory.vbe del/f/q Memory.vbe
@set cont=0

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d "0x0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d "0x0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SuperHidden" /t REG_DWORD /d "0x1" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowSuperHidden" /t REG_DWORD /d "0x0" /f

@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\ attrib -r -a -s -h %%F:\*.* /s /d

@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\ del %%F:\*.bak; autorun.*; *.shs; *.gid; *.chk; *.temp; *.tmp /f /s /q

@if exist "%UserProfile%\AppData\Local\Microsoft\Photo Acquisition" del "%UserProfile%\AppData\Local\Microsoft\Photo Acquisition\*" /f /s /q
@if exist "%TEMP%\*.*" del /f/s/q "%TEMP%\*.*"
@if exist "%UserProfile%\Recent" del "%UserProfile%\Recent\*" /f /s /q
@if exist "%SystemRoot%\TEMP" del "%SystemRoot%\TEMP\*" /f /s /q
@if exist "%SystemRoot%\Prefetch" del "%SystemRoot%\Prefetch\*" /f /s /q
@if exist "%SystemRoot%\system32\wbem\Logs\*.*" del "%SystemRoot%\system32\wbem\Logs\*.*" /f/s/q
@if exist "%SystemRoot%\Debug\UserMode\*.*" del "%SystemRoot%\Debug\UserMode\*.*" /f/s/q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" del "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint\*" /f /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" del "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent\*" /f /s /q
@if exist "%UserProfile%\AppData\Local\Temp" del "%UserProfile%\AppData\Local\Temp\*" /f /s /q
@if exist "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" del "%UserProfile%\Datos de programa\Microsoft\Office\Reciente\*" /f /s /q
@if exist "%UserProfile%\Config~1\Temp" del "%UserProfile%\Config~1\Temp\*" /f /s /q
@if exist "%UserProfile%\Config~1\Archivos temporales de Internet" del "%UserProfile%\Config~1\Archivos temporales de Internet\*" /f /s /q
@if exist "%UserProfile%\AppData\Local\Microsoft\Windows\Explorer" del "%UserProfile%\AppData\Local\Microsoft\Windows\Explorer\*.*" /f /s /q
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\$RECYCLE.BIN del %%F:\$RECYCLE.BIN\* /f /s /q

@if exist "%UserProfile%\Recent" rd "%UserProfile%\Recent" /s /q
@if exist "%SystemRoot%\TEMP" rd "%SystemRoot%\TEMP" /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" rd "%UserProfile%\AppData\Roaming\Microsoft\PowerPoint" /s /q
@if exist "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" rd "%UserProfile%\AppData\Roaming\Microsoft\Windows\Recent" /s /q
@if exist "%UserProfile%\AppData\Local\Temp" rd "%UserProfile%\AppData\Local\Temp" /s /q
@if exist "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" rd "%UserProfile%\Datos de programa\Microsoft\Office\Reciente" /s /q
@if exist "%UserProfile%\Config~1\Temp" rd "%UserProfile%\Config~1\Temp" /s /q
@if exist "%UserProfile%\Config~1\Archivos temporales de Internet" rd "%UserProfile%\Config~1\Archivos temporales de Internet" /s /q
@if exist "%UserProfile%\Entorno de red" rd "%UserProfile%\Entorno de red" /s /q
@for %%F in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%F:\$RECYCLE.BIN rd %%F:\$RECYCLE.BIN /s /q


start explorer.exe


I hope you find it useful. I would appreciate it if you could "give me" your ideas on the subject, modifications, improvements and/or links to your articles.

"To invest you don't have to be a millionaire, but to become a millionaire, you have to invest". - Anonymous.


Earn active and passive earnings (using referral programs). However, I recommend that you do your own research.

πŸ’² QuantFuryΒ (JRRU2593) - Trading - Join using my invite code: JRRU2593 and we will both receive a free share like AAPL or UBER, or crypto like BTC or ETH (up to $250). Trade and invest with no commissions or borrowing fees at real-time spot prices from the NYSE, Nasdaq, CME, Bats, Binance and Coinbase exchanges. With a good marketing management you have the possibility of obtaining passive profits without operating in the market.

πŸ’² StormGainΒ - Trading - They can startΒ without investment, capital is acquired for free with the Bitcoin Cloud Miner.Β 

πŸ’² BingXΒ - Trading - Called "The People's Exchange", it places a strong emphasis on social trading and offers its clients extensive features: new user rewards, demo account, high leverage, spot trading, standard and perpetual futures, grid trading, copy feed , etc.

πŸ’²Β Bulb,Β Publish0xΒ - Earn daily Crypto, NTFs or Money for reading or writing articles and interacting with publications.

πŸ’² AddmeFast - Earn daily Crypto. Promote and increase the sources of traffic, visibility, reach and reputation of your social networks.

πŸ’² Bitrefill - Living with crypto, a philosophy of financial freedom. Travel, play, eat and live with BTC.

🎁 Undress AI - It's obvious, right?

🎁 Games,  Horoscope, Dating, Sweepstakes, Health, Video, Download, Others, Special - mVAS (+18).

πŸ’–Donate To The AuthorπŸ’–

How do you rate this article?


CryptoEntrepreneurs Verified Member

Trader, entrepreneur, freelancer, enthusiast and promoter of globalization, adoption and understanding of cryptocurrencies and new information and communication technologies (ICTs)

A bit of everything ...
A bit of everything ...

β€œEveryone has their own forms of expression. I think we all have a lot to say, but finding ways to say it is more than half the battle." Criss Jami (existentialist philosopher, poet, essayist, musician, singer, designer and lyricist). | "Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth". Marcus Aurelius (Roman Emperor).

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.