Archive: Backup?


Backup?
Ok i have one question..

Once I have the install directory how can I

Copy files from it to another directory to back them up?


copy and paste :P


Ha ha very funny.. no really here is my code what's wrong

Section "Back up"
SetOutPath $INSTDIR\OALBK
CopyFiles "blah.ocx" "bo.dll" 0
SectionEnd

it doesnt work..


hmmm try

Section "Back up"
SetOutPath $INSTDIR\OALBK
CopyFiles "$INSTDIR\OALBK\blah.ocx" "$INSTDIR\OALBK\bo.dll" 0
SectionEnd

i hope it works, i am only a beginner.


Yea, Olfred, that should do it.

-Duane


That doesnt make sence tho the back up directory doesnt exist yet and even if it did the files arnt in the back up directory yet so how/why would I copy and paste them back into the same dir.?


Section "Back up"
SetOutPath $INSTDIR\OAL_BK
CopyFiles "$INSTDIR\advert.ocm" "$INSTDIR\aimres.dll" "$INSTDIR\aim.odl 0
SectionEnd

This looks right..


CopyFiles path_of_file_or_wildcard_on_destination_system destination_path size_of_files_in_kb
Copies files from the source to the destination on the installing system. Useful with $EXEDIR if you want to copy from installation media, or to copy from one place to another on the system. Uses SHFileOperation, so the user might see a status window of the copy operation if it is large. The last parameter specifies how big the copy is (in kilobytes), so that the installer can approximate the disk space requirements.
So...You need to do it like this:
Section "Back up" 
SetOutPath $INSTDIR\OAL_BK
CopyFiles "$INSTDIR\advert.ocm" "INSTDIR\OAL_BK" 0
CopyFiles "$INSTDIR\aimres.dll" "INSTDIR\OAL_BK" 0
CopyFiles "$INSTDIR\aim.odl" "INSTDIR\OAL_BK" 0
SectionEnd
You could do this, depending on what files you wanted:
...
CopyFiles "$INSTDIR\a*.*" "INSTDIR\OAL_BK" 0
...