vbgunz
14th April 2005 09:11 UTC
How to Delete Lines 1 Through 7, Then Last 3 Lines?
Can someone please offer some help on this issue. I am generating some files and within them is erroneous data that needs to be removed. Basically, the first 7 lines and last 3 lines need to be erased from the file.
Any help is greatly appreciated!
Instructor
14th April 2005 11:03 UTC
Name "Output"
OutFile "Output.exe"
!include "TextFunc.nsh"
!insertmacro LineFind
Section
${LineFind} "C:\input.txt" "C:\output.txt" "1:7 -3:-1" "LineFindCallback"
IfErrors 0 +2
MessageBox MB_OK "Error"
SectionEnd
Function LineFindCallback
StrCpy $0 SkipWrite
Push $0
FunctionEnd
Script used header
Afrow UK
14th April 2005 11:33 UTC
You could simplify the LineFindCallback a little if you like...
Function LineFindCallback
Push SkipWrite
FunctionEnd
-Stu
vbgunz
14th April 2005 21:35 UTC
This is great! Thanks Afrow and thanks Instructor!