package main
import (
"fmt"
"os/exec"
)
func main() {
//删除C:\Users\Administrator\Desktop目录下的index.html文件
c := exec.Command("cmd", "/C", "del", "C:\\Users\\Administrator\\Desktop\\index.html")
if err := c.Run(); err != nil {
fmt.Println("Error: ", err)
}
}
|
请发表评论