.:: CODE SNIPPET ::.

"Your time is limited, so don't waste it living someone else's life"

How to read an text file line by line in NSIS


This is just a small snippet to guide how to read text file by every line in NSIS
NSIS support instruction FileRead to read the line of a file, we just use it in a loop

FileOpen $0 $INSTDIR\file.dat r
LOOP:
ClearErrors
IfErrors exit_loop
FileRead $0 $1
DetailPrint $1
Goto LOOP
exit_loop:
FileClose $0
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: