Launch File Properties From Command Line

  • Thread starter cliff.morgan1970
  • Start date


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".
Direct download link

OK, extract this into a directory and open a command prompt from that
I like Open Command Window Here

Let's use Notepad for example.

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
echo This is Notepad version 5.1.2600.2180
goto end
echo This is NOT Notepad version 5.1.2600.2180

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question