Jeff,
> I called GetLastError and it returned 127
ERROR_PROC_NOT_FOUND, which is quite surprising to me. You _are_ on
NT, right? (If not, check out KB article Q140570, "How to Move Files
That Are Currently in Use" for a Win95 method.)
This small C++ proglet works fine for me:
#include <windows.h>
#include <stdio.h>
#pragma hdrstop
int main( int argc, char *argv[] )
{
if ( argc != 3 )
{
puts( "usage: mvbf somefile targetpath" );
return 1;
}
if ( MoveFileEx( argv[1], argv[2],
MOVEFILE_DELAY_UNTIL_REBOOT | MOVEFILE_REPLACE_EXISTING ) )
{
puts( "The move/rename will be done during the next boot." );
return 0;
}
else
{
printf( "Sorry -- Win32 error %lu was returned.\n",
GetLastError() );
return 2;
}
Quote:}
If you check your email, you should find a compiled version to play
with. I'd be interested to hear whether this gives the same results.
Cheers,
Felix.
--
If you post a reply, kindly refrain from emailing it, too.
I have killfiled hotmail.com and yahoo.com. If you are legit,
come forth and be recognized -- with a *real* email address.