Sign in to follow this  
Followers 0
vickerps

copy open files

1 post in this topic

#1 ·  Posted (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 by vickerps

Share this post


Link to post
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
Sign in to follow this  
Followers 0