A
Andrew
Hi all,
I am pretty brand new to VB.Net, but I want to begin getting away from
VB6 and start using VB.Net for some of my more simple apps to gain some
experience.
I need some help on what is probably a very simple program. I would
like to create a form where I specify a source drive and folder and target
drive and folder, and the app copies the contents of the source to the
target. Essentially, copy a folder from one spot to another.
Looking through the MSDN on .Net classes, I see there is both a
System.IO.Directory and System.IO.File class, yet only the System.IO.File
has a Copy method. I suppose I could try to use the GetDirectories and
GetFiles methods of the System.IO.Directory class to iterate through the
subfolders and files in each subfolder within the source folder, and then
use the Copy method of the System.IO.File to copy the files over....but that
seems like I would need to do a lot of looping since I may or may not know
how many sub-levels the app will encounter in any given folder.
So, I am asking for a little help, a pointer or two, a link to an
article, something, that will help me create this (what would seem like)
simple app. Your feedback is appreciated!
-- Andrew
I am pretty brand new to VB.Net, but I want to begin getting away from
VB6 and start using VB.Net for some of my more simple apps to gain some
experience.
I need some help on what is probably a very simple program. I would
like to create a form where I specify a source drive and folder and target
drive and folder, and the app copies the contents of the source to the
target. Essentially, copy a folder from one spot to another.
Looking through the MSDN on .Net classes, I see there is both a
System.IO.Directory and System.IO.File class, yet only the System.IO.File
has a Copy method. I suppose I could try to use the GetDirectories and
GetFiles methods of the System.IO.Directory class to iterate through the
subfolders and files in each subfolder within the source folder, and then
use the Copy method of the System.IO.File to copy the files over....but that
seems like I would need to do a lot of looping since I may or may not know
how many sub-levels the app will encounter in any given folder.
So, I am asking for a little help, a pointer or two, a link to an
article, something, that will help me create this (what would seem like)
simple app. Your feedback is appreciated!
-- Andrew