Faites le grand nettoyage de Windows en un clic de souris

Communiquez et partagez vos astuces sur Windows 10
Verrouillé
Patriciag
Messages : 6310
Enregistré le : mer. 3 juin 2015 16:44
Etes vous un robot ? : Non
Localisation : Port-sur-Saône / Haute-Saône / France
Contact :

Faites le grand nettoyage de Windows en un clic de souris

Message par Patriciag »

Le script suivant vous permettra de faire le ménage dans Windows 10 et de supprimer tous les fichiers temporaires de votre système d'exploitation.

Dans la zone de recherche Windows, saisissez "Bloc-notes".

Cliquez sur Bloc-notes.

Copiez le code source suivant dans le bloc-notes :
echo GRAND NETTOYAGE WINDOWS!!!

del /f /q "%userprofile%\Cookies\*.*"
del /f /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"

cls

if exist "C:\WINDOWS\temp"del /f /q "C:WINDOWS\temp\*.*"
if exist "C:\WINDOWS\tmp" del /f /q "C:\WINDOWS\tmp\*.*"
if exist "C:\tmp" del /f /q "C:\tmp\*.*"
if exist "C:\temp" del /f /q "C:\temp\*.*"
if exist "%temp%" del /f /q "%temp%\*.*"
if exist "%tmp%" del /f /q "%tmp%\*.*"
if exist "C:\WINDOWS\ShellIconCache\" del /f /q "C:\WINDOWS\ShellI~1\*.*"

cls

if exist "%UserProfilePath%\Local Settings\Temp\" del /f /s /q "%UserProfilePath%\Local Settings\Temp\"
if exist "%UserProfilePath%\Local Settings\Temporary Internet\" del /f /s /q "%UserProfilePath%\Local Settings\Temporary Internet\"
if exist "%UserProfilePath%\Application Data\Sun\Java\Deployment\cache\" del /f /s /q "%UserProfilePath%\Application Data\Sun\Java\Deployment\cache\"
if exist "%UserProfilePath%\AppData\Local\Temp\" del /f /s /q "%UserProfilePath%\AppData\Local\Temp\"
if exist "%UserProfilePath%\AppData\LocalLow\Temp\" del /f /s /q "%UserProfilePath%\AppData\LocalLow\Temp\"
if exist "%UserProfilePath%\AppData\LocalLow\Sun\Java\Deployment\cache\" del /f /s /q "%UserProfilePath%\AppData\LocalLow\Sun\Java\Deployment\cache\"
if exist "%UserProfilePath%\AppData\Local\Microsoft\Windows\Temporary Internet Files\" del /f /s /q "%UserProfilePath%\AppData\Local\Microsoft\Windows\Temporary Internet Files\"

cls

DEL C:\Windows\Prefetch*.* /Q
DEL C:\Windows\Temp*.* /Q
DEL C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Recent Items*.* /Q

cls

echo Tout a été nettoyé chef !!! Veuillez redémarrer pour terminer!
pause
Sans titre.png
Sans titre.png (180.75 Kio) Vu 3578 fois
Dans le menu du Bloc-notes, sélectionnez Fichier puis Enregistrer sous...

Dans la zone Nom du fichier, saisissez "Nettoyage.bat" ou le nom de votre choix avec l'extension .bat.
Sans titre2.png
Sans titre2.png (28.05 Kio) Vu 3578 fois
Sur le bureau, faites un clic droit sur le fichier Nettoyage.bat et sélectionnez Exécuter en tant qu'administrateur.
Sans titre3.png
Sans titre3.png (161.02 Kio) Vu 3578 fois
Une fois le script terminé, appuyez sur une touche pour quitter.

Un redémarrage est nécessaire pour procéder au nettoyage complet.

Source : http://www.tutoriaux-excalibur.com/opti ... ouris.html
Avatar du membre
chantal11
Messages : 6924
Enregistré le : dim. 25 sept. 2011 11:59
Localisation : Aude
Contact :

Re: Faites le grand nettoyage de Windows en un clic de souris

Message par chantal11 »

Pour tout commentaire ou demande d'aide sur cette astuce, merci d'ouvrir un nouveau sujet dans la catégorie "Discussions Générales" du système d'exploitation concerné.
Image Image
Image
En cas de problème constaté sur un sujet, alertez un modérateur. N'intervenez pas vous-même. Merci
Verrouillé