FILEVER.EXE for command

Discussion in 'Scripting' started by James, Apr 8, 2005.

  1. James

    James Guest

    when i execute
    H:\>filever c:\ee\ee.exe /B /D /A
    W32i APP ENU 5.4.0.32 shp c:\ee\ee.exe

    i want to get the 5.4.0.32 from the for loop.

    for /f "delims= tokens=8" %%I in ('filever /b /d /a c:\ee\ee.exe') do @echo
    %%I

    results displayed is always W32i APP ENU 5.4.0.32

    how can i *ONLY* retrieve 5.4.0.32 ?
     
    James, Apr 8, 2005
    #1
    1. Advertisements

  2. for /f "Tokens=4" %%i in ('filever /b /d /a c:\ee\ee.exe') do (
    @echo %%i
    )


    or

    for /f "Tokens=1-5*" %%I in ('filever /b /d /a c:\ee\ee.exe') do (
    @echo %%L
    )



    Jerold Schulman
    Windows Server MVP
    JSI, Inc.
    http://www.jsiinc.com
     
    Jerold Schulman, Apr 8, 2005
    #2
    1. Advertisements

  3. James

    stmasi

    Joined:
    Jul 3, 2012
    Messages:
    1
    Likes Received:
    0
    Usage Issue...

    So, when I run this code on a machine that is running IE 8.0.6001.18702...

    Code:
    if exist "c:\program files\internet explorer\iexplore.exe" (
        for /f "tokens=4" %%i in ('"c:\filever.exe" /b /a /d "c:\program files\internet explorer\iexplore.exe"') do set appver=%%i
    )
    if "%appver%" == "8.0.6001.18702" (
        echo YOUR BROWSER IS CURRENT
        goto end
    )
    echo YOUR BROWSER NEEDS TO BE UPGRADED
    :end
    
    I get a "The filename, directory name, or volume label syntax is incorrect." error and then the "YOUR BROWSER NEEDS TO BE UPGRADED" is displayed.

    What am I doing wrong? Thanx.
     
    stmasi, Jul 3, 2012
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.