Re: Directory.Copy
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 05/25/04
- Next message: Rob: "Re: SerializationException during Deserialization of a class"
- Previous message: Vlad: "Re: Currency Formatting"
- In reply to: Leo: "Directory.Copy"
- Next in thread: Peter Huang: "RE: Directory.Copy"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 23:09:27 +0100
Leo <leo@noemail.noemail> wrote:
> I am having a heck of time trying to find the equivalent of Directory.Copy.
>
> Why would they have a Directory.Move and not a Directory.Copy?
Because moving a directory is an atomic operation. Copying a directory
essentially involves copying every file - and there are other methods
which do that.
> Please if you have some sample code on copying a Directory it would
> be helpfull.
Basically just find out what's in the directory, and use File.Copy on
each file you want to copy. You may choose to recurse if you want to
copy subdirectories.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Rob: "Re: SerializationException during Deserialization of a class"
- Previous message: Vlad: "Re: Currency Formatting"
- In reply to: Leo: "Directory.Copy"
- Next in thread: Peter Huang: "RE: Directory.Copy"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|