CopyFile and File not working as expected or ??
Hi here is my code...
This is a macro, and im sending the values
FileOnDisc = C:\My\a.dll
FileName = C:\MYBuild\a.dll
CopyFiles ${FileOnDisc} $EXEDIR\temp
iferrors 0 +2
Messagebox MB_OK "Copy - ${FileOnDisc}"
clearErrors
MessageBox MB_OK ${FileOnDisc}
delete ${FileOnDisc}
iferrors 0 +2
Messagebox MB_OK "Delete - ${FileOnDisc}"
clearErrors
${LogText} "${FileOnDisc} is being replaced"
Messagebox MB_OK ${FileName}
file /oname=${FileOnDisc} ${FileName}
iferrors 0 +2
Messagebox MB_OK "Fille - ${FileOnDisc}"
clearErrors
My objective is to extract the C:\MYBuild\a.dll to C;\MY\a.dll and before that i need to take a back up...
Now its not extracting the dll, instead it copies the old DLL itself, But if i delete the old DLL(from C;\MY Folder) then it works provided i dont have the temp folder. If temp folder exists then i get the old version itself...
So some thing is going wrong at CopyFile point.. if i remove copyFile statement then every thing works fine.
wer im wrong pls tell me...:eek: