Answer the question
In order to leave comments, you need to log in
How to execute os/exec command relative to another directory?
There is an exec.Command that downloads a file to the same directory where the binary is. Is it possible to run a command relative to another directory?
Answer the question
In order to leave comments, you need to log in
cwd, err = os.Getwd()
err = os.Chdir("/куда/хотите/грузить")
exec.Command(...)
err = os.Chdir("cwd")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question