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