in reply to Windows equivlanet of Unix sync

Try this. No guarentees as it is quite hard to contrive a test scenario.

Adjust the drive letter in the call to createFile() to suit.

#! perl -slw use strict; use Win32API::File; ## Hacked to export everything use Win32::API::Prototype; ApiLink 'Kernel32', q[BOOL FlushFileBuffers( HANDLE hFile )] or die $^E; my $devHandle = createFile( '//./C:', 'wke' ); $devHandle == -1 and die $^E; FlushFileBuffers( $devHandle ) or die $^E;

Examine what is said, not who speaks.
"But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen
"Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo         "Efficiency is intelligent laziness." -David Dunham
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon