title: How to copy a file from one directory to another using "os/exec" package in GO
body: <p>if I am in directory A and running the GO code, and I need to copy a file from directory B to directory C , how to do it? I tried adding cmd.Dir = "B" but it can copy the files in "B" directory, but when I try full path for directory "C" it throws error "exit status 1"</p>
  
  <p>basic code sample</p>
  
  <p>Currently in directory A with location "/var/A"
  cmd := exec.Command("cp","/var/C/c.txt","/var/B/")
  err := cmd.Run()</p>