Archive: Backup prev installed directory/subdirectorys


Backup prev installed directory/subdirectorys
Hi,
I am trying to backup more than one direcories where each of them have more than one subdirectory all directories with several files, before installing a new patch. Anybody with an ide how I can do that?:confused:


Something like this?


FUnction .onINit
InitPluginsDir
#discover previous $INSTDIR
CreateDirectory "$PLUGINSDIR\backup"
CopyFiles "$INSTDIR\*.*" "$PLUGINSDIR\backup"
#apply patch
FunctionEnd

Thanks for your quick reply.

I'm still confuced.
Your scode sample did not work. I did not do anything at all. I have tried several modifications and I have also tried using IfFileExists without any success.

The $PLUGINSDIR is a temporay directory, can that be my problem?

I want to make a new directory "$INSTDIR\backup" to backup the old direcorys an files to and as I mentioned will have several directories with several subdirecories.