run a .bat sortcut in cmd window


  1. Posts : 18
    Windows 7 Home Premium 32bit
       #1

    run a .bat sortcut in cmd window


    I tried to run a Batch file shortcut in a cmd window. It failed because it won't realise the shortcut. Is there any way to do it? Thank you very much!
      My Computer


  2. Posts : 6,285
    Windows 10 Pro X64
       #2

    Where is the batch file located? To run from a Command Prompt it either has to be in the current directory (C:\Users\<youruserid> ) or in a directory contained in the PATH environment variable.

    To see what directories are in path, type path from a Command Prompt.
      My Computer


  3. Posts : 748
    Vista and now 7 in 32 and 64 bit.
       #3

    Try changing .bat to .cmd
      My Computer


  4. Posts : 18
    Windows 7 Home Premium 32bit
    Thread Starter
       #4

    I tried to change .bat to .cmd. The shortcut to a .cmd file still can not be executed in command window. I think set environment variable PATH is the best way can do. Thank you everyone!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:57.
Find Us