Click here to Skip to main content
Click here to Skip to main content
Alternatives (3)

find files occupied sectors on hard disk

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)

About the Author

xLordProgrammer

United States United States
No Biography provided

| | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 21 Jul 2012
Article Copyright 2012 by xLordProgrammer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid