Skip to content
⌘ NSIS Forum Archive

Environment variables

5 posts

Gluck#

Environment variables

Hi,

I have to move a folder from the app folder to User/Documents.

What is the name of this folder?

(I've tried $DATADIR and $DOCUMENTS, but the operation fails)...

Thanks.
Anders#
$DOCUMENTS but I don't know what you mean by the other folder, $AppData perhaps? All the constants are documented in the help file...
Gluck#
I have this code:

!define SOURCEDIRMOVE1 "$EXEDIR\Data\MyFolder"
!define TARGETDIRMOVE1 "$DOCUMENTS\MyFolder"

RMDir "/r" "${TARGETDIRMOVE1}-BackupBy${APPNOSPACE}Portable"
Rename "${TARGETDIRMOVE1}" "${TARGETDIRMOVE1}-BackupBy${APPNOSPACE}Portable"

IfFileExists "${SOURCEDIRMOVE1}\*.*" +4
IfFileExists "$EXEDIR\Data\${APP}\*.*" 0 +5

CreateDirectory "${TARGETDIRMOVE1}"
CopyFiles /SILENT "${SOURCEDIRMOVE1}\*.*" "${TARGETDIRMOVE1}"

I want move the content in $EXEDIR\Data\MyFolder
To User/Documents, but

CreateDirectory "${TARGETDIRMOVE1}

Don't build a new folder in Documents...



In the line:

IfFileExists "${SOURCEDIRMOVE1}\*.*" +4
IfFileExists "$EXEDIR\Data\${APP}\*.*" 0 +5

What does it means +4 and 0 +5???