Advertisement
LightProgrammer000

Gerenciador de Disco

Jan 24th, 2022
1,923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.42 KB | None | 0 0
  1. @echo off
  2. :: Arquivo em lote
  3. rem Comentario com comando REM
  4.  
  5. :: Estrutura em escolha
  6. :menu
  7.  
  8.     :: Apresentacao
  9.     cls && color A
  10.     echo.
  11.     echo #############################
  12.     echo # User: %userprofile% #
  13.     echo # Computer: %computername% #
  14.     echo #############################
  15.     echo.
  16.    
  17.     :: Opcoes
  18.     echo [1] Verificacao de erros
  19.     echo [2] Checagem do disco
  20.     echo [3] Scanner
  21.     echo [4] Melhorar inicializacao
  22.     echo [5] Saida
  23.    
  24.     :: Estrutura em escolha
  25.     choice /n /c:12345 /t 60 /d 5 /m "# Resp.: "
  26.    
  27.     :: Estrutura de decisao
  28.     if %errorlevel% == 1 goto 1
  29.     if %errorlevel% == 2 goto 2
  30.     if %errorlevel% == 3 goto 3
  31.     if %errorlevel% == 4 goto 4
  32.     if %errorlevel% == 5 goto 5
  33.  
  34.     :1
  35.         goto funcao1
  36.  
  37.     :2
  38.         goto funcao2
  39.        
  40.     :3
  41.         goto funcao3
  42.    
  43.     :4
  44.         goto funcao4
  45.  
  46.     :5
  47.         exit
  48.        
  49. :: FUNCOES
  50. :funcao1
  51.     cls && color B
  52.     echo.
  53.     echo ########################
  54.     echo # Verificacao de erros #
  55.     echo ########################
  56.     echo.
  57.     sfc /verifyonly && pause
  58.     goto menu
  59.    
  60. :funcao2
  61.     cls && color C
  62.     echo.
  63.     echo #####################
  64.     echo # Checagem do disco #
  65.     echo #####################
  66.     echo.
  67.     chkdsk && pause
  68.     goto menu
  69.  
  70. :funcao3
  71.     cls && color D
  72.     echo.
  73.     echo ###########
  74.     echo # Scanner #
  75.     echo ###########
  76.     echo.
  77.     sfc /scannow && pause
  78.     goto menu
  79.    
  80. :funcao4
  81.     cls && color D
  82.     echo.
  83.     echo ##################
  84.     echo # Defragmentador #
  85.     echo ##################
  86.     echo.
  87.     defrag c: /B /U && pause
  88.     goto menu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement