Friday, June 05, 2009 10:19 PMHello,
I'm looking to develop a way to delete millions of small files from NTFS directories. The standard console command and Win32 APIs work but take many days or weeks to complete the job. Meanwhile, the machine is blogged down with the disk activity.
Is there a forum that discusses NTFS internals?
Help much appreciated.
Friday, June 05, 2009 10:55 PM
Thank you for your post! I would suggest posting your question in the 'Windows Server TechCenter > Windows Server Forums > General ' located here: http://social.technet.microsoft.com/Forums/en-US/winservergen/threads
Have a great day!
SachinW Tier 2 Application Support Server and Tools Online Engineering Live Services Team
Saturday, June 06, 2009 1:19 AM
Thanks, I can post there but I think the forum I'm looking for has more to do with file system drivers rather than admin. why don't I see any device driver forums on MSDN?
Tuesday, March 08, 2011 6:51 PM
I'm interested in this subject. I am looking for a way to identify the physical blocks on disk that are 'owned' by a specific file. I've written and posted code to enumerate the Master File Table (MFT) and to use the USN Journal to identify the changes that occur on a volume.
Let me know where you've ended up and I'll be a frequent visitor/contributor.
Monday, April 11, 2011 8:54 PM
I think there is a way to do it quickly. I've posted code about enumerating files by reading the Master File Table (MFT). I you search the msdn forums for 'MFT' you'll find it.
Anyway, each file in the master file table has a deleted bit that is set if the entry has been deleted. It should be as easy as enumerating the MFT, finding the files you want to delete and setting the deleted bit. I haven't done this but I remember reading about the deleted bit.
Here is a link to a Code Project article that may help. I haven't used it but I've skimmed through it. http://www.codeproject.com/KB/files/NTFSUndelete.aspx
Let me know how it works out.
Wednesday, April 13, 2011 6:22 PMModerator
Sorry there is no OS support for MFT. Microsoft assumes you to access the file system via its File APIs so it can maintain integrity of the file system.
If you want access NTFS without using File APIs, visit http://www.microsoft.com/about/legal/en/us/intellectualproperty/iplicensing/ to license the technology.
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP