Is there a way to guarantee that a file in Windows (using the NTFS file system) will use contiguous sectors on the hard drive? In other words, the first fragment of the file will be saved in a certain sector, the second fragment of the file will be saved in the next sector, etc.
I must add that I want to be able to create this file programmatically, so I would rather not just ask the user to defragment his hard drive after creating this file. If there is a way to programmatically defragment only the file that I am creating, then this will also be OK.
Terry source share