Install Files inside loop
Posted: Tue Jul 02, 2013 3:50 pm
The following code does not seem to do what I expect. Could anyone help me out?
It's intended to install the same source files into multiple destinations. Instead, only the final directory in the sTargetList has files placed into it.
Set Variable sTargetList to c:\Target1\|c:\Target2 for each Element sTargetItem in | delimited Collection of $sTargetList$ do
MessageBox: Install List, $sTargetItem$subdir$NEWLINE$$NEWLINE$$sTargetList$
Install Files C:\source file path\*.* to $sTargetItem$subdir, include subfolders
next
Am I missing something? I put the message box in there to see each directory its supposed to be installing to, and that's correct, so the Install Files function is being called multiple times.
It's intended to install the same source files into multiple destinations. Instead, only the final directory in the sTargetList has files placed into it.
Set Variable sTargetList to c:\Target1\|c:\Target2 for each Element sTargetItem in | delimited Collection of $sTargetList$ do
MessageBox: Install List, $sTargetItem$subdir$NEWLINE$$NEWLINE$$sTargetList$
Install Files C:\source file path\*.* to $sTargetItem$subdir, include subfolders
next
Am I missing something? I put the message box in there to see each directory its supposed to be installing to, and that's correct, so the Install Files function is being called multiple times.