01/10/2018, 12:09

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?

Vô Thin viết 14:14 ngày 01/10/2018

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.

Vô Thin viết 14:13 ngày 01/10/2018

it just changes the indexing table of the file (which is stored in MFT (Master File Table) in NTFS (for example), or FAT table…)

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

Bài liên quan
0