```
// demo project main.go
package main
import (
"fmt"
"os/exec"
)
func main() {
cmd := exec.Command("cmd.exe", "/c", "start D:\\del\\del.bat")
err := cmd.Run()
if err != nil {
fmt.Println("Error:", err)
return
}
}
```
有疑问加站长微信联系(非本文作者)