Jump to content

Flush Disk Cache


Recommended Posts

Sysinternals sync?

Don't think there is a autoit function to do it, but I'm not an expert, so anyone is there?

Regards

Uten

Link to comment
Share on other sites

not free to distribute if you read the eula :)

At least in Windows XP each usb device has additional field "optymalization for quick removal" or "optimatization for quick access" or something like that in Device Manager for that specific device. Check it out. Unless you meant something else.

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

not free to distribute if you read the eula :)

You might try it in c, i think this will work

// crt_flushall.c
/* This program uses _flushall
 * to flush all open buffers.
 */

#include <stdio.h>

int main( void )
{
   int numflushed;

   numflushed = _flushall();
   printf( "There were %d streams flushed\n", numflushed );
}

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

You might try it in c, i think this will work

// crt_flushall.c
/* This program uses _flushall
 * to flush all open buffers.
 */

#include <stdio.h>

int main( void )
{
   int numflushed;

   numflushed = _flushall();
   printf( "There were %d streams flushed\n", numflushed );
}
thanks!

is there an exe anywhere! i dont know how 2 compile it:)

Link to comment
Share on other sites

whats built into windows?!

i can call from autoit script?

At least in Windows XP each usb device has additional field "optymalization for quick removal" or "optimatization for quick access" or something like that in Device Manager for that specific device. Check it out. Unless you meant something else.

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

And if you do not find a builtin solution. Grab a copy of Dev-C, Cut and past the code @gafrost provided in a new project and hit the compile button.

Edited by Uten
Link to comment
Share on other sites

And if you do not find a builtin solution. Grab a copy of Dev-C, Cut and past the code @gafrost provided in a new project and hit the compile button.

Well Mr Frost!

Thanks to the nice person who left the last comments i compiled it no probs. cheers

Its very very fast; not like the sysinternals one that takes a good 3 or 4 seconds

this one just instantly says "3 items flushed" and i dont see any disk activity.

Is this really flushing the disk cache; for all drives or just my hard drive?

Not sure what this code does

Link to comment
Share on other sites

Well Mr Frost!

Thanks to the nice person who left the last comments i compiled it no probs. cheers

Its very very fast; not like the sysinternals one that takes a good 3 or 4 seconds

this one just instantly says "3 items flushed" and i dont see any disk activity.

Is this really flushing the disk cache; for all drives or just my hard drive?

Not sure what this code does

http://msdn.microsoft.com/library/default....t__flushall.asp

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Is this really flushing the disk cache; for all drives or just my hard drive?

Not shure how you have monitored the USB disk until now, but I supose you could monitor with Filemon from sysinternals and see if you get any activity after the flush call.

Link to comment
Share on other sites

Not shure how you have monitored the USB disk until now, but I supose you could monitor with Filemon from sysinternals and see if you get any activity after the flush call.

i havent looked at this thread since this morning!

i found and used the unxutils at lunchtime today and we've got that sync.exe working...

thank u to all of u for ur comments

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...