Click here to Skip to main content
16,012,107 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem retrieving data from list box Pin
Ryan Binns23-Jul-03 15:55
Ryan Binns23-Jul-03 15:55 
GeneralRe: problem retrieving data from list box Pin
Deepak Samuel23-Jul-03 23:56
Deepak Samuel23-Jul-03 23:56 
GeneralRe: problem retrieving data from list box Pin
Ryan Binns24-Jul-03 2:10
Ryan Binns24-Jul-03 2:10 
GeneralLoading text into a browser control Pin
HP723-Jul-03 13:14
HP723-Jul-03 13:14 
GeneralIs it possible to use Manifest file in VC6 Pin
Valera24117623-Jul-03 10:07
Valera24117623-Jul-03 10:07 
GeneralRe: Is it possible to use Manifest file in VC6 Pin
AlexO23-Jul-03 10:43
AlexO23-Jul-03 10:43 
GeneralRe: Is it possible to use Manifest file in VC6 Pin
Debs24-Jul-03 0:25
Debs24-Jul-03 0:25 
GeneralCreating un-fragmented files Pin
od@ananzi.co.za23-Jul-03 9:02
od@ananzi.co.za23-Jul-03 9:02 
Hi There,

I am busy with an application that needs to pre-allocate all available space on a clean-formatted dedicated drive to datafiles of a fixed size. At this stage I am doing something like:

<br />
while (freediskspace < allocatespace)<br />
{<br />
// Create new file<br />
// Write to file 10 times, (allocatespace/10) bytes at a time<br />
// Close the file<br />
}<br />


Creating the files like this, one after the other, I would expect that there would be minimal (if any) fragmentation on the disk. However, when I then run Microsoft Defragment to analyze the disk it reports that just about all the created files are fragmented and some of them even into 93 fragments.

I have experimented with different allocation size, writing different chunk size at a time, etc, but all of them result in fragmented files.

My question is now very simply this: How do I create files on a clean-formatted drive without them becoming fragmented ??

Thanks
OD
GeneralRe: Creating un-fragmented files Pin
QuiJohn23-Jul-03 9:14
QuiJohn23-Jul-03 9:14 
GeneralRe: Creating un-fragmented files Pin
AlexO23-Jul-03 9:15
AlexO23-Jul-03 9:15 
GeneralRe: Creating un-fragmented files Pin
David Crow23-Jul-03 9:15
David Crow23-Jul-03 9:15 
GeneralRe: Creating un-fragmented files Pin
John M. Drescher23-Jul-03 9:16
John M. Drescher23-Jul-03 9:16 
GeneralRe: Creating un-fragmented files Pin
Bob Stanneveld23-Jul-03 12:38
Bob Stanneveld23-Jul-03 12:38 
GeneralRe: Creating un-fragmented files Pin
Ryan Binns23-Jul-03 16:06
Ryan Binns23-Jul-03 16:06 
GeneralRe: Creating un-fragmented files Pin
Anders Molin23-Jul-03 13:41
professionalAnders Molin23-Jul-03 13:41 
GeneralRe: Creating un-fragmented files Pin
FlyingDancer23-Jul-03 15:04
FlyingDancer23-Jul-03 15:04 
GeneralRe: Creating un-fragmented files Pin
Ryan Binns23-Jul-03 16:05
Ryan Binns23-Jul-03 16:05 
GeneralRe: Creating un-fragmented files Pin
od@ananzi.co.za23-Jul-03 21:03
od@ananzi.co.za23-Jul-03 21:03 
GeneralAuto application logout Pin
Andrew Allen23-Jul-03 8:54
Andrew Allen23-Jul-03 8:54 
GeneralRe: Auto application logout Pin
John M. Drescher23-Jul-03 9:21
John M. Drescher23-Jul-03 9:21 
GeneralRe: Auto application logout Pin
Ryan Binns23-Jul-03 18:55
Ryan Binns23-Jul-03 18:55 
GeneralRe: Auto application logout Pin
John M. Drescher23-Jul-03 19:14
John M. Drescher23-Jul-03 19:14 
Generalqualifying enums ... Pin
Maximilien23-Jul-03 8:32
Maximilien23-Jul-03 8:32 
GeneralRe: qualifying enums ... Pin
Nathan Blomquist23-Jul-03 8:43
Nathan Blomquist23-Jul-03 8:43 
GeneralRe: qualifying enums ... Pin
QuiJohn23-Jul-03 8:55
QuiJohn23-Jul-03 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.