Where is the MFT for NTFS?

Posted on 2009-04-19
Last Modified: 2013-12-28
I want to know where is the MFT file for my drive(s). I know that there are free HEX editor that can open the MFT. But I am just wondering where it is and if you can programmatically read it in .net(C#/VB) or JAVA

Thanks in advance!
Question by:roychan0328
    LVL 86

    Expert Comment

    You'll find a lot of useful information at - and ("Undelete a file in NTFS") has some sample code on how to handle the MFT and it's entries.

    Author Comment

    Thanks for the quick response. I have read both links. What I am trying to do is to read the $mft programatically.

    It seems to me that C# can't really do it. you have to use C/C++, if you use C#, I think you have to use P/Invoke. which I believe the overhead is high...(from what I read on the net so far)

    So... is there a way to read $mft directly from C# or Java?

    LVL 86

    Accepted Solution

    Well, either way you'd have to call Win32 APIs, so we're back at P/Invoke...

    Author Closing Comment

    super responsive!
    LVL 39

    Expert Comment

    Unfortunately, this thread is already closed.  Jkr was right about the Win32 APIs, but it is not really hard to do.. and as with many things, if somebody else has already done it..... For the sake of the archive and for anybody interested, here's a solution: check this post on the social MSDN forum for how to do it.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
    Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now