CODE: [Copy to clipboard]@echo off for %%a in (A\b*.log) do ( fc a.txt "%%a" >nul 2>nul if errorlevel 1 echo:%%a >> b.txt )