The first digit means counting from the left. Answers: 1210 2020
If the first digit is counted from the right, then 0202 0121. If the first digit cannot be 0, otherwise it would be a three-digit number, then there is no solution.
Below is for counting the first digit from the left
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
for /l %%a in (0,1,3) do (
for /l %%b in (0,1,3) do (
for /l %%c in (0,1,3) do (
for /l %%d in (0,1,3) do (
set n=0
for /l %%e in (0,1,3) do (
set m%%e=0
if %%a==%%e set /a m%%e+=1
if %%b==%%e set /a m%%e+=1
if %%c==%%e set /a m%%e+=1
if %%d==%%e set /a m%%e+=1
)
if !m0!==%%a set /a n+=1
if !m1!==%%b set /a n+=1
if !m2!==%%c set /a n+=1
if !m3!==%%d set /a n+=1
if !n!==4 echo %%a%%b%%c%%d
))))
ENDLOCAL
pause