Copy a file without using the windows file cache

后端 未结 6 1433
情深已故
情深已故 2021-01-01 00:42

Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache?
Typical use is copying a large file from a USB drive, or server

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 01:23

    I am not sure if this helps, but take a look at Increased Performance Using FILE_FLAG_SEQUENTIAL_SCAN.

    SUMMARY

    There is a flag for CreateFile() called FILE_FLAG_SEQUENTIAL_SCAN which will direct the Cache Manager to access the file sequentially.

    Anyone reading potentially large files with sequential access can specify this flag for increased performance. This flag is useful if you are reading files that are "mostly" sequential, but you occasionally skip over small ranges of bytes.

提交回复
热议问题