I saved the files to be copied to a .dat file as below.
\Bin\a.exe
\Bin\b.dll
\Bin\c.dll
\Bin\d.dll
\Bin\e.dll
\Bin\f.dll
Then I want to read the .dat file line by line. I read it by line as below code(.nsi).
ClearErrors
FileOpen $0 "CopyFileList.dat" r
loop:
FileRead $0 $1
Strcmp $1 "" done
StrCpy $varBinFileName $1
File /r "${TARGETDIR}\$varBinFileName"
goto loop
done:
FileClose $0
Then two problems arise!!
1) Read the name of the variable itself, not the stored value of the variable $varBinFileName.
So, even though the file is there,
The file can not be found because it is not a file name.
2) When a .dat file is read, a "||" is added.
For example, reading the first line produces the following results: \Bin\a.exe||
I want to get the result of removing "||" to use it when copying files.
Please let me know if there is a better way to read the .dat file line by line and copy it over the loop instead of the code I wrote.