locked
Run a bath file automatically after comparing PC name RRS feed

  • Question

  • Hi,

    I have the following scenarion.

    There exist multiple bat files uder a folder called TempFolder

    \TempFolder\PCName1.bat
    \TempFolder\PCName2.bat
    ...........................................
    \TempFolder\PCName99.bat
    \TempFolder\PCName100.bat

    All I need is to run the bat file that matches PC name and runs it. (In FirstRunOnce)
    I mean query to check the PC name, match the correct file from \TempFolder and run it.


    N.A.Malik

    Friday, December 20, 2013 10:08 AM

Answers

  • Here you go:

    \TempFolder\%ComputerName%.bat

    P.S. Have another look at the Subject of your post. "Bath" file?
    • Edited by Frederik Long Friday, December 20, 2013 10:20 AM
    • Proposed as answer by Tas76 Friday, December 20, 2013 10:49 AM
    • Marked as answer by Bill_Stewart Friday, December 20, 2013 3:17 PM
    Friday, December 20, 2013 10:20 AM

All replies

  • Here you go:

    \TempFolder\%ComputerName%.bat

    P.S. Have another look at the Subject of your post. "Bath" file?
    • Edited by Frederik Long Friday, December 20, 2013 10:20 AM
    • Proposed as answer by Tas76 Friday, December 20, 2013 10:49 AM
    • Marked as answer by Bill_Stewart Friday, December 20, 2013 3:17 PM
    Friday, December 20, 2013 10:20 AM
  • Yes - It is like "Run a bath after dinner"  We like to be clean.

    Your answer is very simple. It will work in a bath file.

    ;)


    ¯\_(ツ)_/¯

    Friday, December 20, 2013 10:49 AM
  • Ha Ha Ha.

    My mistake guys , sorry for that and thanks for the reply.


    N.A.Malik

    Friday, December 20, 2013 1:02 PM