sov44,
Попробуйте так:
Код:
@echo off
setlocal
set /p file="File to find: "
call:search "%file%"
goto:eof
:search
set "name=%~n1"
set "ext=%~x1"
set "wmic=wmic datafile where (filename="%name%" AND extension="%ext:~1%") get name /value"
for /f "tokens=2 delims==" %%i in (' "%wmic%" ') do echo %%i