Archive: Two rename commands sequence


Two rename commands sequence
Hi,

I've got a little problem with the rename commands. In the following example the first command will work alway, but the second one will never work. Any suggestions what's the problem?

Rename "$INSTDIR\..\op-buch" "$INSTDIR\..\op-buch-backup-${PRODUCT_VERSION}"

Rename "$INSTDIR\..\op-buch-${PRODUCT_VERSION}" "$INSTDIR\..\op-buch"


Kind Regards,
Christoph


Maybe you meant for it to have "-backup" as well?

Rename "$INSTDIR\..\op-buch-backup-${PRODUCT_VERSION}" "$INSTDIR\..\op-buch"
Or maybe "$INSTDIR\..\op-buch" already exists when you try to rename.

Try using a MessageBox to show the values of what you're trying to move so you can make sure everything is correct.

Okay, after playing arround a little, I found a working solution:

SetOutPath "$INSTDIR\..\"
Rename "OP-Buch" "OP-Buch-Backup-${PRODUCT_VERSION}"
Rename "OP-Buch-${PRODUCT_VERSION}" "OP-Buch"

Thanks anyway =)