For Each txtfile As FileInfo In topDir.GetFiles("*.txt", SearchOption.AllDirectories)which would result in the source and destination paths being the same. Your actual directory/file structure is not clear but changing to
For Each txtfile As FileInfo In subDir.GetFiles("*.txt", SearchOption.AllDirectories)should solve the problem ?
File.AppendAllText(Path.Combine(topDir.FullName, curFileName), File.ReadAllText(txtfile.FullName))
rather than the StreamReader....