Calculate file to index path