SYSTEMES D’EXPLOITATION
Introduction aux fichiers BATCH
rem ----------------------------------------------------------------------------
SYSTEMES D’EXPLOITATION
Introduction aux fichiers BATCH
del h:\temp.txt del i:\temp.txt
pause Cleaner Ce script permet de défragmenter des postes sur votre réseau, en les allumants si des utilisateurs les ont éteints. echo off cls title Cleaner! v1.2 rem définintions des chemins des fichiers de configuration set log=c:\windows\rapport.txt set conf=c:\windows\confhdd del %log%
:skip rem log color 0e echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» >>%log% echo º CLEANER: Rapport º >>%log% echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ >>%log% echo. >>%log% echo. >>%log% echo. >>%log% echo ____________________________________________________________________________ >> %log% echo Drives: >> %log% more %conf%2.txt >> %log% echo ____________________________________________________________________________ >> %log% if not exist c:\windows\confclean.txt goto set
if exist %conf%.txt goto skip rem scan des disques durs
goto run echo 1 > c:\temp.txt echo 1 > d:\temp.txt echo 1 > e:\temp.txt echo 1 > f:\temp.txt echo 1 > g:\temp.txt echo 1 > h:\temp.txt echo 1 > i:\temp.txt
:set color 0a cls echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º CLEANER Configuration º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ echo. echo. FOR /f "tokens=1 delims=," %%i in (%conf%.txt) do cleanmgr.exe /d%%i /sageset: 1 echo 1 > c:\windows\confclean.txt
if exist c:\temp.txt echo c >> %conf%.txt if exist d:\temp.txt echo d >> %conf%.txt if exist e:\temp.txt echo e >> %conf%.txt if exist f:\temp.txt echo f >> %conf%.txt if exist g:\temp.txt echo g >> %conf%.txt if exist h:\temp.txt echo h >> %conf%.txt if exist i:\temp.txt echo i >> %conf%.txt
:run color 0b cls echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» echo º CLEANER: Hard Drive Cleaning º echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ echo. echo. echo Nettoyage des disques dur en cours... cleanmgr.exe /dc /sagerun: 1
if exist c:\temp.txt echo c: >> %conf%2.txt if exist d:\temp.txt echo d: >> %conf%2.txt if exist e:\temp.txt echo e: >> %conf%2.txt if exist f:\temp.txt echo f: >> %conf%2.txt if exist g:\temp.txt echo g: >> %conf%2.txt if exist h:\temp.txt echo h: >> %conf%2.txt if exist i:\temp.txt echo i: >> %conf%2.txt
echo. >>%log% echo. >>%log%
del c:\temp.txt del d:\temp.txt del e:\temp.txt del f:\temp.txt del g:\temp.txt
rem defrag cls color 0c 29
DSI
1ere année BTS-/H.MACHHOUR
30 DSI
1ere année BTS-/H.MACHHOUR