2

Simple question how do i copy and move the entier contents of a directory to another ussing VB.net then also delete the files from there original directory?

LabRat
  • 1,996
  • 11
  • 56
  • 91

1 Answers1

5

I think this is the easiest way:

FileIO.FileSystem.CopyDirectory(sourceFolder, outputFolder)
FileIO.FileSystem.DeleteDirectory(sourceFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)

There are additional overloads with a few more options, like showing dialogs to the user during copy.

Jay
  • 5,897
  • 1
  • 25
  • 28