Advertisement
Rick0

STATUS_HD_CRYSTALDISK

Mar 12th, 2020
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.27 KB | None | 0 0
  1. @echo off
  2. SET "ORIGEM=\\SERVIDOR\CAMINHO\PASTA_CRYSTALDISK"
  3. SET "DESTINO=%SYSTEMDRIVE%\SUPORTE\APP\"
  4. SET "LOGS=\\SERVIDOR\CAMINHO\PASTA_CRYSTALDISK_LOGS"
  5. ::COPIANDO PASTA DO CRYSTAL DISK CASO NAO EXISTA NA MAQUINA
  6. IF NOT EXIST "%DESTINO%DiskInfo32.exe" (echo f|xcopy /R /S /H /D /V /Y /O /F "%ORIGEM%" "%DESTINO%" > nul)
  7.  
  8. ::VALIDANDO EXISTENCIA DO ARQUIVO DE ANALISE DO CRYSTAL DISK CASO EXISTA APAGUE
  9. IF EXIST "%DESTINO%DiskInfo.txt" del /f /q "%DESTINO%DiskInfo.txt" > nul
  10.  
  11. ::COPIANDO ARQUIVO DE CONFIGURACAO DO CRYSTAL DISK
  12. echo f|xcopy /R /S /H /D /V /Y /O /F "%ORIGEM%\DiskInfo.ini" "%DESTINO%\DiskInfo.ini" > nul
  13.  
  14. ::TESTANDO SAUDE DO HD E SAINDO "COMANDO /COPYEXIT"
  15. "%DESTINO%DiskInfo32.exe" /COPYEXIT > nul
  16. ::CHECANDO SE EXISTE DISKINFO.TXT E RETORNANDO SOMENTE O STATUS DO HD E COPIANDO PARA A PASTA DE LOGS
  17. IF EXIST "%DESTINO%DiskInfo.txt" TYPE "%DESTINO%DiskInfo.txt" |Findstr /i /c:"Model" /c:"Health Status" >"%LOGS%\%COMPUTERNAME%_HD_STATUS.txt"
  18. ::(goto) 2>nul & del "%~f0"
  19. ::FILTRAR OS LOGS DE SAIDA
  20. ::FINDSTR /I /M /C:"Health Status : Alerta" /C:"Health Status : Cr" "\\SERVIDOR\CAMINHO\PASTA_CRYSTALDISK_LOGS\*.txt"
  21. ::FORFILES /P "%DESTINO%CdiResource\language" /M *.lang /C "cmd /c if @isdir==FALSE if not @file==0x22English.lang0x22 del /f /Q @path" > nul
  22.  
  23. EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement