M
Matthew Eno
I have a problem where I'm developing some code that moves files from
one place to another (on the same drive) with the destination file
having a new name.
What's happening is that the line of code where I do the file.move is
taking a very long time (in the order of around 7 seconds for a simple
30kb file).
The only thing that I can think may be causing the problem is that
theere is around 1.1 million files to move, so perhaps it's the
operating system having to maintain the file system that is making it
take so long.
To find how long the file.move step is taking I'm just doing the
following:
starttime = Now.ToOADate * 100000
File.Move(DocPath,FileDestination)
endtime = Now.ToOADate * 100000
Console.WriteLine("Moved file " & DocPath & " (" & endtime - starttime
& " seconds)")
Does anyone know why it would be taking so long, and another question
- would performing a file.exists take a long time if there is such a
large number of files ?
one place to another (on the same drive) with the destination file
having a new name.
What's happening is that the line of code where I do the file.move is
taking a very long time (in the order of around 7 seconds for a simple
30kb file).
The only thing that I can think may be causing the problem is that
theere is around 1.1 million files to move, so perhaps it's the
operating system having to maintain the file system that is making it
take so long.
To find how long the file.move step is taking I'm just doing the
following:
starttime = Now.ToOADate * 100000
File.Move(DocPath,FileDestination)
endtime = Now.ToOADate * 100000
Console.WriteLine("Moved file " & DocPath & " (" & endtime - starttime
& " seconds)")
Does anyone know why it would be taking so long, and another question
- would performing a file.exists take a long time if there is such a
large number of files ?