Copy file from one location to another

Iam very new to minifilter driver concept.
How to copy the file from one location to another ie Copy C:\a.txt to D:\a.txt.
please give me guidelines on this issue


Please give us context for your question. Are you doing this from inside your mini-filter? If so, open the source file and the destination file and copy it from one to the other. I personaly recommend doing this non-cached in the general case (to avoid cache thrashing) unless you believe the file(s) are going to be re-used in the near-term future.

Also, don’t forget that a “file” can consist of multiple distinct pieces in Windows - it’s data, it’s attributes, it’s security descriptor, it’s EAs, etc. Some file systems also have the concept of “streams” (distinct data elements) and you need to copy those as well.