Help to understand
Posted: 03 Aug 2022 02:39
Hello everyone,
I could use some help to understand what this part of code in a .bat file does:
Thanks
I could use some help to understand what this part of code in a .bat file does:
Code: Select all
for /f "tokens=1 usebackq" %%A in (%casa%\tmp\lista-t.txt) do (
rem del /q /f %casa%\tmp\t-ok.txt
for /f "tokens=1 usebackq" %%a in (%casa%\tmp\lista-zip.txt) do (call :CREALISTA-OK %%A %%a )
if not exist %casa%\tmp\t-ok.txt echo il file t %%A รจ senza corrispondente zip quindi non lo carico >> %casa%\tmp\t-orfani.txt
)
if %errorlevel% equ 0 (echo OK >> %log-file%) else (echo FALLITA >> %log-file%)
echo --------------------------- >> %log-file%
if exist %casa%\tmp\t-orfani.txt (
echo Giorno: %date% Ora: %time% >> %log-file%
echo file .t senza zip rilevati: >> %log-file%
type %casa%\tmp\t-orfani.txt >> %log-file%
set testo-mail=Rilevati file .t senza relativo file.zip: vedere file di log o file t-orfani.txt
set termina-script=no
call :ALERT
echo --------------------------- >> %log-file%
)