@ECHO OFF IF [%1]==[] GOTO Syntax IF NOT [%2]==[] GOTO Syntax ECHO.%1 | FIND "?" >NUL IF NOT ERRORLEVEL 1 GOTO Syntax IF NOT EXIST %1 GOTO Syntax IF NOT "%OS%"=="Windows_NT" GOTO Syntax SETLOCAL SET FileVer= FOR /F "tokens=1 delims=[]" %%A IN ('STRINGS %1 ^| FIND /N /V "" ^| FIND /I "FileVersion"') DO SET LineNum=%%A SET /A LineNum += 1 FOR /F "tokens=1* delims=[]" %%A IN ('STRINGS %1 ^| FIND /N /V "" ^| FIND "[%LineNum%]"') DO SET FileVer=%%B SET FileVer ENDLOCAL GOTO:EOF :Syntax ECHO. ECHO FileVer.bat, Version 1.00 for NT 4 / 2000 / XP ECHO Display the specified file's version number ECHO. ECHO Usage: FILEVER progfile ECHO. ECHO Where: "progfile" is the name of a Windows executable, DLL, or system file ECHO. ECHO Uses SysInternal's STRINGS.EXE, avalable at http://www.sysinternals.com ECHO. ECHO Written by Rob van der Woude ECHO http://www.robvanderwoude.com