How to create new command to execute a batch file with Sublime Text?

Here is my answer for this:

The steps to follow

  • Install edit-command-palette plugin for Sublime Text (it is easy, so I won't describe how);
  • Edit the command file: from menu "Preferences" select "Command - User";
  • Edit the key bindings file to add hotkeys: menu "Preferences" select "Key Bindings - User".

The command file (second step):

[
    {
        "caption": "moyshale",
        "command":"exec",
        "args": {"cmd": "c:\\drive\\1file\\cp.bat"}
    }
]

Adding a hot-key (third step):

"keys": ["ctrl+shift+y"],
        "command":"exec",
        "args": {"cmd": "c:\\drive\\1file\\cp.bat"}

(It's basically the same, just needs to change keys and caption)