Dim $Chk = 2
$Chk = FileCopy(@ScriptDir & '\' & "MyFile.exe","C:\Program Files\My Folder\",1)
if $Chk == 0 Then; 1 = success 0 = fail
MsgBox(0,"Info","Copying Failed")
Exit
EndIf
i use the above code to determine is my copying process end successfully or not. and i always get the msgbox which means unsuccessful. why don't know yet. ok first the source address or path i use is a variable one while destination path is fixed. and i also verify the source path by using the following test e.g. so i ensure that i am getting the right path or not.
Dim $directory = @ScriptDir & '\' & "MyFile.exe" or Dim $directory = @ScriptDir & "\" & "MyFile.exe" [same result.]
MsgBox(0,"Info",$directory)
Exit
the result i get is
D:\_temp\_testing\MyFile.exe
which is perfect 4 a source path anyone know what i was doing wrong.