|
|
#1 |
|
Junior Member
|
Read, edit a single line in a file?
Is it possible for NSIS to edit a single line in a file? Like overwrite line 2 of runmefirst.bat with "move ..\setup\*.* .\setup32"
|
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You will have to read the file using FileRead line by line and write to another temporary file, using FileWrite. When you reach the desired line write the line you want to replace it instead of the line read. After you write your line, continue reading and writing like before. Then just replace the old file with the temporary file.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
|
That... is confusing.
Could you give me an example?
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
PHP Code:
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
|
THAT one helps! Thanks!
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|