title: How can I find information about a file from logical cluster number in NTFS/FAT32?
body: <p>I am trying to defragment a single file through Windows defragmentation API ( <a href="http://msdn.microsoft.com/en-us/library/aa363911(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa363911(VS.85).aspx</a> ) but if there is no free space block large enough for my file I would like to move other parts of files to make room for it.</p>
  
  <p>The linked article mentions moving parts of other files but I can't find any information about how to find out which files to move. From the free space bitmap I can find an almost large enough space and I know the logical cluster numbers surrounding it, but from this I can't find out which files are surrounding it and a handle to the files is required to do FSCTL_MOVE_FILE which moves parts of files.</p>
  
  <p>Is there any way, through the API or by parsing the MFT, to find out what file a logical cluster number is part of, and what virtual cluster number in the file corresponds to the logical cluster number found through the bitmap?</p>