vickerps Posted July 27, 2010 Posted July 27, 2010 (edited) Does anyone know of a way to copy an open file. I have found a way which work great http://blogs.msdn.com/b/adioltean/archive/2005/01/05/346793.aspx I have also failed abysmally in trying to convert it to an autoit script here is my failed attempt ; Script Start - Add your code below here #include <Process.au3> local $CALLBACK_SCRIPT If NOT ($CALLBACK_SCRIPT=="") Then IS_CALLBACK() IF $CmdLine[0] = 0 Then Msgbox (0,"Source and dest","must enter source and dest") $s = $CmdLine[1] $SOURCE_DRIVE_LETTER=StringLeft($s,2) $SOURCE_RELATIVE_PATH=StringtrimLeft($s,3) $DESTINATION_PATH=$CmdLine[2] $CALLBACK_SCRIPT=@ScriptFullPath $TEMP_GENERATED_SCRIPT="GeneratedVarsTempScript.cmd" _Rundos("\vshadow.exe -script=" & $TEMP_GENERATED_SCRIPT & "-exec=" & $CALLBACK_SCRIPT &" "& $SOURCE_DRIVE_LETTER) FileDelete ($TEMP_GENERATED_SCRIPT) Func IS_CALLBACK() Run($TEMP_GENERATED_SCRIPT) filecopy ($SHADOW_DEVICE_1 & "\" & $SOURCE_RELATIVE_PATH,$DESTINATION_PATH) EndFunc Edited July 27, 2010 by vickerps
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now