Skip to content

Instantly share code, notes, and snippets.

@aeppert
Created February 10, 2017 01:53
Show Gist options
  • Save aeppert/24fd926314466f71fc879e2deaefb0ce to your computer and use it in GitHub Desktop.
Save aeppert/24fd926314466f71fc879e2deaefb0ce to your computer and use it in GitHub Desktop.

Revisions

  1. @johnzan johnzan created this gist Dec 23, 2015.
    16 changes: 16 additions & 0 deletions movefile.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    package main

    import (
    "fmt"
    "os"
    )

    func main() {

    err := os.Rename("/dir1/file1", "/dir2/file2")

    if err != nil {
    fmt.Println(err)
    return
    }
    }