Old 8th December 2018, 19:13   #1
Gluck
Member
 
Join Date: Apr 2018
Posts: 92
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.
Gluck is offline   Reply With Quote
Old 8th December 2018, 22:33   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,946
$DOCUMENTS but I don't know what you mean by the other folder, $AppData perhaps? All the constants are documented in the help file...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th December 2018, 10:24   #3
Gluck
Member
 
Join Date: Apr 2018
Posts: 92
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???
Gluck is offline   Reply With Quote
Old 10th December 2018, 01:58   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,946
Those are relative jumps but you should not be using them, use labels or LogicLib.nsh

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th December 2018, 12:46   #5
Gluck
Member
 
Join Date: Apr 2018
Posts: 92
Thanks
Gluck is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump