There are files file_new.exe and file.exe .

How to rename file_new.exe from file.exe to go to file.exe or copy with replacement?

  • Well at least not "how to add two numbers." - Abyx
  • Well, I agree that a simple question. Started google and could not find. It happens to everyone. Someone will need, the answer will be immediately on the forum - Rakzin Roman

1 answer 1

 package main import ( "fmt" "os" ) func main() { //Путь начального и конечного файлов err := os.Rename("new.txt", "index.txt") if err != nil { fmt.Println(err) return } } 
  • Please try to leave a little more detailed answers. - aleksandr barakin