Georgio,
Код:
@ECHO off
setlocal enabledelayedexpansion
SET directum1=c:\lab2\1
SET directum2=c:\lab2\2
CD "%directum2%"
FOR /f %%I IN ('DIR /b /a-d "%directum1%"') DO set dir1=!dir1! %%i
FOR /f %%J IN ('DIR /b /a-d "%directum2%"') DO (
set dir1=!!dir1: %%J=""!!
IF NOT ERRORLEVEL 1 ECHO %%~nJ
)
PAUSE