How do I execute cmd commands through a batch file?

前端 未结 8 759
难免孤独
难免孤独 2020-12-02 07:37

I want to write a batch file that will do following things in given order:

  1. Open cmd
  2. Run cmd command cd c:\\Program files\\IIS Express
相关标签:
8条回答
  • 2020-12-02 08:15
    @echo off
    title Command Executer
    color 1b
    
    echo Command Executer by: YourNameHere
    echo #################################
    : execute
    echo Please Type A Command Here:
    set /p cmd=Command:
    %cmd%
    goto execute
    
    0 讨论(0)
  • 2020-12-02 08:18

    I think the correct syntax is:

    cmd /k "cd c:\<folder name>"
    
    0 讨论(0)
提交回复
热议问题