Answer the question
In order to leave comments, you need to log in
How to execute cmd command from go?
Got a team
D:\1c\8.3.9.2170\bin\1cv8.exe CREATEINFOBASE File="D:\_lang\go\gopath\src\peregruzki_assistant\local\cl1\db" /AddInList"cl1" /UseTemplate"D:\_lang\go\gopath\src\peregruzki_assistant\local\cl1\cf\rel.cf"
exec.Command(path, args...)
I tried each parameter separately, and exec.Command(command)
tried it in its entirety, preferably without running the batch file to do this
Answer the question
In order to leave comments, you need to log in
cmd := exec.Command(`D:\1c\8.3.9.2170\bin\1cv8.exe`, "CREATEINFOBASE", `File="D:\_lang\go\gopath\src\peregruzki_assistant\local\cl1\db"`, `/AddInList"cl1"`, `/UseTemplate"D:\_lang\go\gopath\src\peregruzki_assistant\local\cl1\cf\rel.cf"`)
stdoutStderr, err := cmd.CombinedOutput()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", stdoutStderr)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question