@ECHO OFF IF "%~1"=="" GOTO Syntax IF NOT "%~2"=="" GOTO Syntax IF NOT EXIST "%~1" ( ECHO. ECHO ERROR: image not found: "%~1" GOTO Syntax ) PHP.EXE -? >NUL 2>&1 IF ERRORLEVEL 1 ( ECHO. ECHO ERROR: PHP.EXE not found GOTO Syntax ) SETLOCAL SET File=%~1 SET File=%File:\=/% PHP.EXE -r "print(@exif_read_data('%File%',null,true)['EXIF']['UndefinedTag:0xA434']);" | FINDSTR.EXE /R /C:"." ENDLOCAL & EXIT /B %ErrorLevel% :Syntax ECHO. ECHO Lens.bat, Version 1.00 for Windows 10 and later ECHO Use PHP to read the lens type from an image's EXIF data ECHO. ECHO Usage: Lens.bat image ECHO. ECHO Where: image is the image file to be investigated ECHO. ECHO Notes: This batch file requires PHP.EXE, which can be downloaded from ECHO https://www.php.net/downloads.php ECHO Successfully extracted lens data will be displayed on screen. ECHO The batch file can return the following errorlevels: ECHO 0: lens data successfully extracted ECHO 1: no lens data could be found ECHO -1: command line error, or image or PHP.EXE not found ECHO. ECHO Written by Rob van der Woude ECHO https://www.robvanderwoude.com EXIT /B -1