Copy a folder with System.IO

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using IO to copy files, and would like to use it to copy folders. Is there a simple way to copy a folder and all the contents within it? I am using VB.NET.
 
Hi,

I think you're going to have to use the DirectoryInfo.GetFiles() method
to retrieve a list of files in your source folder and then copy them one by
one using File.Copy().

David

Josh said:
I am using IO to copy files, and would like to use it to copy folders. Is
there a simple way to copy a folder and all the contents within it? I am
using VB.NET.
 
Back
Top