Click here to Skip to main content
13,094,983 members (81,681 online)
Click here to Skip to main content
Alternatives (3)
Add your own
alternative version

Tagged as


Posted 21 Jul 2012

find files occupied sectors on hard disk

, 21 Jul 2012
I am writing a project using win32 API and i need to find files occupied sectors on hard disk, and then write on these sectors.for example:I have one file (test.txt) and i want to find which sectors this file has been occupied?does anybody know how can i do this?


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

21 Jul 2012
I assume you are trying to write a secure delete application?That is not as easy as you think...Google is your friend here: Secure delete c++[^] - but be prepared for some work, it is not at all easy. Just think about SSDs - they don't write where they tell you they are, just mark the old...
22 Jul 2012
As far as I know, it is impossible to write to a specific sector on disk through win32 API. You need to write a driver using low-level kernel API.
23 Jul 2012
Another resource is the SysInternals utilities. There are some interesting file system utilities with source code there.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
No Biography provided

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.170813.1 | Last Updated 21 Jul 2012
Article Copyright 2012 by xLordProgrammer
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid