I'm trying to do some tests of copying speed on our WAN. As I'd somewhat suspected, using the File.Copy(source, dest) .NET function seems to get faster on the 2nd and subsequent run. I suspect either my corporate network is doing some crafty caching, or windows is.
What's the best way to avoid the risk of this happening? Would renaming the source file to a random string each time be sensible, or is there a cleverer way to circumvent it?
I think I'll close this. I think perhaps the best way is to generate a random file (doing something like: Creating a Random File in C#) and transfer that.
I also found the caching mainly only affected local copying, which was less of a concern than the network ones I was trying to measure.