9 // MoveToSubdir moves all contents of a directory to a subdirectory underneath the original path
10 func MoveToSubdir(oldpath, subdir string) error {
12 infos, err := ioutil.ReadDir(oldpath)
16 for _, info := range infos {
17 if info.Name() != subdir {
18 oldName := filepath.Join(oldpath, info.Name())
19 newName := filepath.Join(oldpath, subdir, info.Name())
20 if err := os.Rename(oldName, newName); err != nil {