Files (x86)\Merge eFilm\eFilm\DICOM" /M * /C "cmd /c if @isdir==TRUE (echo DIR: @fdate @ftime @path) else (echo FLE: @fdate @ftime @path)"echo --------------------------------------------------------------------------------forfiles /P "C:\Program Files (x86)\Merge eFilm\eFilm\DICOM" /M * /C "cmd /c if @isdir==TRUE (rmdir /S /Q @path) else (del /F /Q @path)"echo --------------------------------------------------------------------------------echo %dataformatada% %time:~0,-3% Fim da tarefa: limpar eFILM DICOM.echo %dataformatada% %time:~0,-3% Fim da tarefa: limpar eFILM DICOM. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log"echo %dataformatada% %time:~0,-3% Fim da tarefa: limpar eFILM DICOM. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log":: REALIZAR A TAREFA: Apagar banco de dados eFILMIF EXIST "C:\Program Files (x86)\Merge eFilm\eFilm\Database\DICOMdb.ldb" ( del /F /Q "C:\Program Files (x86)\Merge eFilm\eFilm\Database\DICOMdb.ldb") ELSE ( echo %dataformatada% %time:~0,-3% Arquivo DICOMdb.ldb nao encontrado [Operacao nao monitorada em log])IF EXIST "C:\Program Files (x86)\Merge eFilm\eFilm\Database\DICOMdb.mdb" ( del /F /Q "C:\Program Files (x86)\Merge eFilm\eFilm\Database\DICOMdb.mdb") ELSE ( echo %dataformatada% %time:~0,-3% Arquivo DICOMdb.mdb nao encontrado [Operacao nao monitorada em log]):: REALIZAR A TAREFA: Restaur banco vazio do eFILMpushd "C:\Program Files (x86)\Merge eFilm\eFilm\Database\""%userprofile%\scriptsclinicadia\laudos\7za.exe" e DICOMdb.zip > nul 2>&1IF %ERRORLEVEL% EQU 0 ( echo %dataformatada% %time:~0,-3% Banco vazio do eFILM restaurado com sucesso. echo %dataformatada% %time:~0,-3% Banco vazio do eFILM restaurado com sucesso. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log" echo %dataformatada% %time:~0,-3% Banco vazio do eFILM restaurado com sucesso. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log") ELSE ( echo %dataformatada% %time:~0,-3% ERRO: Banco vazio do eFILM nao foi restaurado! echo %dataformatada% %time:~0,-3% ERRO: Banco vazio do eFILM nao foi restaurado! > "%userprofile%\scriptsclinicadia\laudos\logs\laudoserros.log" echo %dataformatada% %time:~0,-3% ERRO: Banco vazio do eFILM nao foi restaurado! >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoserroscontinuo.log" popd GOTO finaldoarquivo )popd:: Verificar espaco em DISCO finalwmic logicaldisk where DriveType='3' get DeviceID, FreeSpace, Size | find ":" | cscript.exe /nologo calculatefreespace.js > "%userprofile%\scriptsclinicadia\laudos\script-clinica-dia-inputfile.txt"echo %dataformatada% %time:~0,-3% Estado final dos discos:echo %dataformatada% %time:~0,-3% Estado final dos discos: >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log"echo %dataformatada% %time:~0,-3% Estado final dos discos: >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log"echo --------------------------------------------------------------------------------type "%userprofile%\scriptsclinicadia\laudos\script-clinica-dia-inputfile.txt"echo --------------------------------------------------------------------------------type "%userprofile%\scriptsclinicadia\laudos\script-clinica-dia-inputfile.txt" >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log"type "%userprofile%\scriptsclinicadia\laudos\script-clinica-dia-inputfile.txt" >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log":: Mensagens finaisecho %dataformatada% %time:~0,-3% Final do script.echo %dataformatada% %time:~0,-3% Final do script. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log"echo %dataformatada% %time:~0,-3% Final do script. >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log"echo %dataformatada% %time:~0,-3% --------------------------------------------------echo %dataformatada% %time:~0,-3% -------------------------------------------------- >> "%userprofile%\scriptsclinicadia\laudos\logs\laudos.log"echo %dataformatada% %time:~0,-3% -------------------------------------------------- >> "%userprofile%\scriptsclinicadia\laudos\logs\laudoscontinuo.log":finaldoarquivoTIMEOUT /NOBREAK /T 300calculatefreespace.js 1 2 3 4 5 6 7 8 9101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899/** * WINDOWS SCRIPT JSCRIPT * * Calculate Free Space from a specific wmic input. * calculatefreespace.js * version: 1.0 * * Script para tratar resultado do WMIC: * wmic logicaldisk where DriveType='3' get DeviceID, FreeSpace, Size * wmic logicaldisk where DriveType='3' get DeviceID, FreeSpace, Size | find ":" * * CALL ME: * cscript.exe /nologo calculatefreespace.js * or * wscript.exe calculatefreespace.js * * USE ME: * wmic logicaldisk where DriveType='3' get DeviceID, FreeSpace, Size | find ":" | cscript.exe /nologo calculatefreespace.js * * SEE: * wmic logicaldisk where DriveType='3' get DeviceID, FileSystem, FreeSpace, Size, VolumeName, VolumeSerialNumber * * SEE: * https://msdn.microsoft.com/en-us/library/4yyeyb0a.aspx * https://msdn.microsoft.com/en-us/library/yek4tbz0.aspx * * Special Characters * https://msdn.microsoft.com/en-us/library/2yfce773.aspx * * Operators * https://msdn.microsoft.com/en-us/library/6hsc0eak.aspx * https://msdn.microsoft.com/en-us/library/z3ks45k7.aspx * */var i = 0;var entrada = new Array();var root = new Array();// Le a entrada como uma stream de dados do consolewhile (!WSH.StdIn.AtEndOfStream){ entrada[i] = WSH.StdIn.ReadLine(); i++;}// Exibe o cabecalhoWSH.Echo("Drive / Free Space / Full Space / Used Space");for(i=0; i < entrada.length;i++) { /** // olny for debug purposes WSH.Echo("Entrada: "+entrada[i]); */ // Le o primeiro pedaco || Remove o primeiro pedaco || Limpa espacos