Directory.Move

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

Guest

I am developing an ASP.NET website with C#, VS 2003 and Framework 1.1. For
some reason every time I execute a Directory.Move command, the next command
takes 10-20 seconds to execute. Has anyone else experienced this? I just want
to rename a directory, so if there is a better way I am all ears.

Thanks
 
More informaiton:
When I use other Directory methods to duplicate the Directory.Move (see
below), it works screaming fast as expected. So what is the deal with
Directory.Move()?

Duplicated Directory.Move with the following (this does not copy directories):
Directory.CreateDirectory(newDir);
string [] files = Directory.GetFiles(oldDir);
for (int i=0; i<files.Length; i++)
File.Copy(oldDir+files, newDir+files);
Directory.Delete(oldDir);
 
Back
Top