8

On my hunt to find an answer, I came across an answer to the opposite question, how to find which file occupies a sector (on Windows, use nfi.exe from the Windows 2000 OEM toolkit).

From what I know, finding the sector(s) a file is occupying is quite possible as a program I had used called Ultimate Defrag does this (for fragmented files in it's list).

Does anyone know of a program that will report the sector(s) a file occupies on NTFS?

3 Answers 3

9

SysInternals' DiskView will show you which clusters a file occupies (GUi only and not files which are in use such as system files).

Run it, let it scan, then use the Hightlight row at the top to pick a file to locate. Double click somewhere on the disk-mapping to see the details.

Not sure that answers your question about sectors, but since NTFS can sit on top of hardware RAID, it can't really know which sectors it's on. Or whether it's on a disk device where sectors is a sensible thing to talk about at all (e.g. an SSD).

6
  • Excellent! This allows me to verify what I thought, these dang files aren't sequentially placed on the drive. It's unfortunate that this doesn't give you the "address" of the file, since the high zoom level makes it quite impossible to see where one file is located in relation to another.
    – brandeded
    Aug 18, 2011 at 20:45
  • 1
    That's why I suggested double clicking on the blue picture bit - a window pops up telling you the file cluster locations in numbers. If you want to make them sequential, use SysInternals' Contig to defragment a single file. ( live.sysinternals.com ) Aug 18, 2011 at 21:00
  • Ahh hah... thanks. As for contig, I've done this (-s *), then performed a whole volume defrag with windows defrag, then diskeeperlite. Here is the outcome of contig frags/file... Before contig defragmentation: 1.15979, after contig: 1.0068 frags/file, after defrag: 1.00042 frags/file, after copying them to a different drive and back to the original drive: 1.15979 frags/file (which I was hoping would put them all in line at the end of the drive). Yes, seriously it's the same exact number.
    – brandeded
    Aug 19, 2011 at 12:41
  • 1
    Doh. How about move them to a different drive, then do a defrag with "consolidate free space" on the original, then move them back? If you move one to an empty drive, is it in 1 fragment? (What is it, and why is it so important that they are in 1 fragment per file?) Aug 19, 2011 at 14:48
  • I was under the impression that when new things are written to a drive, the drive places the data at the end of the written data. This was apparently a misconception I had, as what you're saying is that the written data just assumes whatever space is available from the 0 sector of the drive???
    – brandeded
    Aug 19, 2011 at 15:09
2

There is several GUI tools including SysInternals' DiskView. You can use MyFragmenter to get a text output.

1

The converse of this question was asked on Superuser. It has a few answers, but like I suggested there, using any of several different defrag utility is the fastest, simplest solution. It works FAT* as well as NTFS.

The same applies to this question because many defrag tools will highlight the clusters used by a selected file in the disk map, even if it is fragmented (of course you have to do a filesystem analysis first, but that doesn’t usually take long).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .