anchor.diff:  1>&2 echo.%~1
   exit /b
   
  +::%1 - png | jpg | gif
  +::%2 -  ⮪
  +::%3 - input file
  +::%4 - output file
   :threadwork
   1>nul 2>&1 md "%~dp4"
   if /i "%1" equ "png" call:pngfilework %2 %3 %4 & if %thread% gtr 1 >>"%countPNG%.%2" echo.1
  
positive.code: exit /b
  
  :saverrorlog
  1>nul 2>&1 del /f /q "%filework%"
  >>"%logfile2%" echo.%~1;%~2;error
  if %thread% equ 1 (call:printfileerr "%~f1" "%~2")
  exit /b
  
negative.code: 1>nul 2>&1 del /f /q "%jpglog%"
  exit /b 1
  
  ::%1 -  ⮪
  ::%2 - input file
  ::%3 - output file
  :giffilework
  set "gsize=%~z2"
  set "errbackup=0"
  set "logfile2=%logfile%gif.%1"
  set "filework="
  if /i "%~f2" equ "%~f3" (
  	set "filework1=%tmppath%\%~n2%1%-gifsicle1~x1"
  	set "filework=!filework1! "
  ) else (
  	set "filework1=%~f3"
  )
  set "filework2=%tmppath%\%~n2%1%-gifsicle2~x1"
  set "filework=%filework%%filework2%"
  if not exist "%~2" (
  	call:saverrorlog "%~f2" "The image is not found"
  	exit /b 1
  