How to DIRECT COPY files WITHOUT READing from Wndows caches.
Posted: 25 Nov 2013 16:14
I can measure the time T_COPY that it takes to copy a large file from one drive to another.
It takes longer to do this the first time after rebooting because the file is not in RAM so it has to be read from the Source Drive,
after which any repetition of the same source file is very much quicker.
That is normally what I want.
Sometimes I really wish to know the time taken to READ the Source Drive,
and to then repeat this measurement without the inconvenience of rebooting the P.C.
Is there a convenient method for preventing the use of the cache or flushing the cache ?
All I have thus far is :-
1. a third party utility
FASTCOPY /cmd=force_copy /auto_close
This has the disadvantage that it adds 300 to 400 mSec to the measurement whilst loading and unloading;
2. Safely Removing and then re-introducing the Source Drive
This has the disadvantages that it involves manual operations and Windows may refuse to safely remove "system drives".
Windows 7 Ultimate includes these "COPY" commands :-
COPY
XCOPY
ROBOCOPY
I find they all use the cache where possible - but perhaps you can tell me of option switches that could be of use.
Are there any other DOS commands native to CMD.EXE that might do what I need.
Is there any CMD.EXE command that a BAT script may invoke to either flush the cache or prevent its subsequent commands from reading from the caches ?
Regards
Alan
It takes longer to do this the first time after rebooting because the file is not in RAM so it has to be read from the Source Drive,
after which any repetition of the same source file is very much quicker.
That is normally what I want.
Sometimes I really wish to know the time taken to READ the Source Drive,
and to then repeat this measurement without the inconvenience of rebooting the P.C.
Is there a convenient method for preventing the use of the cache or flushing the cache ?
All I have thus far is :-
1. a third party utility
FASTCOPY /cmd=force_copy /auto_close
This has the disadvantage that it adds 300 to 400 mSec to the measurement whilst loading and unloading;
2. Safely Removing and then re-introducing the Source Drive
This has the disadvantages that it involves manual operations and Windows may refuse to safely remove "system drives".
Windows 7 Ultimate includes these "COPY" commands :-
COPY
XCOPY
ROBOCOPY
I find they all use the cache where possible - but perhaps you can tell me of option switches that could be of use.
Are there any other DOS commands native to CMD.EXE that might do what I need.
Is there any CMD.EXE command that a BAT script may invoke to either flush the cache or prevent its subsequent commands from reading from the caches ?
Regards
Alan