Why does MS Windows copy a file to the same partition very quickly?

I hope somebody will explain it. Windows sometimes makes me wonder 'cause that magic doesn’t happen even though I copy a file to other directories in the same partition. I used to write a mini program (by java) to copy a file to somewhere and it almost worked in a same speed (kinda slowly). Is there any way to write a copying program without dealing with byte-by-byte reading and writing?

It is not very quickly. It is slow if file is more than 1000MB and HDD is not SSD.

If you don’t like dealing with byte-by-byte reading and writing, you can copy track to track (but the result will be more different than byte-by-byte).

You can call a pro-copy ultility (in your program) which was installed/ OS built-in (ex: xcopy, rsync,…) to get best performance.

1 Like

Oh, very dangerous. If many files with many sizes have just been copied, what happens when a user deletes/ renames or edits original files?

2 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?