Launch File Properties From Command Line

  • Thread starter Thread starter cliff.morgan1970
  • Start date Start date
C

cliff.morgan1970

If you need to verify file properties from the command line, here's how
you do it and how you can use specific information from the properties.

First, you'll need a free app named "VerInfo".
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=7475
Direct download link
http://www.angelfire.com/va3/winmem/verinfo.zip

OK, extract this into a directory and open a command prompt from that
folder.
I like Open Command Window Here
http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe

Let's use Notepad for example.

Type:
verinfo %windir%\system32\notepad.exe

You should get something like this:

**** VerInfo v1.2 Copyright (c) 1999 Károly Kálmán ****

***
*** C:\WINDOWS\system32\notepad.exe
***

File Description : Notepad
File Version : 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
Internal Name : Notepad
Original File Name: NOTEPAD.EXE
Product Name : Microsoft« Windows« Operating System
Product Version : 5.1.2600.2180
Company Name : Microsoft Corporation
Legal Copyright : ¬ Microsoft Corporation. All rights reserved.

File Size : 67 KBytes

Creation Time : August/23/2001 8:0
Modification Time : August/4/2004 1:56
Last Access Time : September/13/2005 19:21

Now, we can filter and use specific information such as the version in
the following batch file.

@echo off
verinfo %WINDIR%\SYSTEM32\Notepad.exe | find "5.1.2600.2180" > NUL
IF ERRORLEVEL 1 (GOTO WrongVersion)
echo This is Notepad version 5.1.2600.2180
goto end
:WrongVersion
echo This is NOT Notepad version 5.1.2600.2180
:end
pause

If the version is correct, this is what you should see.

This is Notepad version 5.1.2600.2180
Press any key to continue . . .
 
Back
Top