Click here to Skip to main content
12,511,544 members (51,627 online)
Click here to Skip to main content
Alternatives (3)
Add your own
alternative version

Tagged as

Stats

4.3K views
Posted

find files occupied sectors on hard disk

, 21 Jul 2012 CPOL
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?

Alternatives

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

21 Jul 2012
OriginalGriff
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
hbprotoss
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
JackDingler
Another resource is the SysInternals utilities. There are some interesting file system utilities with source code there.

License

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

Share

About the Author

xLordProgrammer
United States United States
No Biography provided

Pro
Pro
| | Privacy | Terms of Use | Mobile
Web02 | 2.8.160929.1 | Last Updated 21 Jul 2012
Article Copyright 2012 by xLordProgrammer
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid