Automated File Copying

  • Thread starter Thread starter andrew.varley
  • Start date Start date
A

andrew.varley

HI All,

I am trying to make a small program that will copy the contents of one
folder into another folder automatically. This is for backup and i
want to just be able to run the program and have all the files be
copied. Didn't know if there was some API or some easy lines of code
that anyone knew of.


Thanks in advance


Reply Reply with quote
 
I am trying to make a small program that will copy the contents of one
folder into another folder automatically. This is for backup and i
want to just be able to run the program and have all the files be
copied. Didn't know if there was some API or some easy lines of code
that anyone knew of.

Check out the classes in the 'System.IO' namespace, namely 'Directory' and
'File'. In addition you may want to take a look at
'My.Computer.FileSystem.CopyDirectory'.
 
HI All,

I am trying to make a small program that will copy the contents of one
folder into another folder automatically. This is for backup and i
want to just be able to run the program and have all the files be
copied.

since you mentioned "backup" and "automatically," i'm guessing you
might want this to backup a file whenever something is added to the
folder, or something like that. if that's the case, check out the stuff
mentioned by HW above, but more specifically, see FileSystemWatcher,
which is in System.IO.

Tutorial:
http://www.codeproject.com/dotnet/folderwatcher.asp
 
I wrote a program like this, except that it doesn't have the FileWatcher
stuff in it. You can have it if you want.

Steve
 
Steve,

That would be great if you would send that to me. I just want to see
how you coded it.

Many thanks,
Andrew
 
Steve,

That would be great if you would send that to me. I just want to see
how you coded it.

Many thanks,
Andrew
 
Steve,

That would be great if you would send that to me. I just want to see
how you coded it.

Many thanks,
Andrew
 
Back
Top