Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Two rename commands sequence (http://forums.winamp.com/showthread.php?t=229507)

apoc333 27th October 2005 21:20

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

kichik 27th October 2005 23:05

Maybe you meant for it to have "-backup" as well?
code:
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.

apoc333 29th October 2005 11:48

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 =)


All times are GMT. The time now is 05:12.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.