Defragmentation

wfunction

Well-known member
Joined
Oct 31, 2006
Messages
46
Programming Experience
1-3
I'm not sure if this is the right place for this topic... but oh, well.
Does anyone know how to access a file's data and change its position on the hard disk, l:confused:ike a defragmentation app?
 
Making a file copy will put the new copy at a new location, then you can delete the other, but you can't at user level dictate what position on harddisk you want to set, that requires a low level disk driver bypassing the operating systems driver and filesystem.
 
Oh

Oh, ok. Where do defragmentation softwares get such drivers.. like Diskeeper or O&O Defrag? Can I just use the dfrgntfs.exe found when Diskeeper is installed, for example?
 
might be able to, does the exe file allow for the use of any argument's do launch the needed routines?
 
I don't think so

As far as I know, dfrgntfs.exe does not (at least visibly) take any arguments - who would want to give arguments for every single file being moved?? That would make your system crash!! I have a feeling that there should be some API declarations for the file; however, I have not tried API Monitor to see if that's true...
Also, I don't need the code to move the file to another location - even an API or SDK or something would help, if it, well, helps...
 
if you want to make a single file contiguous but you dont care where, you can use the command line tool called CONTIG from Mark Russinovich/Bryce Cogswell (sysinternals.com)
 
No, I don't

I wish... But I want something that will let me position files on the hard disk...
Does anyone know how the sector editor in the windows xp support tools works?
Try it out, it's neat. If someone can tell me how to do such a thing with VB, I will thank them a lot. ;)
 
Oh, nothing

Nothing interesting - just 4 fun.
I just want to know how some programmers do stuff like this, and why we programmers can't. :mad:
 
Uh... ok..

OK... but that doesn't really help. :)
 
Back
Top