View Full Version : Question about text file findline and delete line
RobbyH
02-05-2003, 06:53 AM
When you do a textfile findline action, does it store the line number of the first line it finds, or all of them?
I am using this, because I need to delete a valuename in a section, and AMS does not seem to have a way to do it.
Lorne
02-05-2003, 08:58 AM
It returns the number of the first line that it finds with that search string in it. Since you can specify the line number to start searching from, you can easily find the first line, then the next, then the next, and so on.
(This is all in the help file, btw. See Command Reference / Actions / Text File / Find Line)
But...what is it you want to do, exactly? (In other words, can you provide a bit more detail?) It's probably a lot easier than you think. /ubbthreads/images/icons/smile.gif
For example, if you're wanting to delete a value from an INI file, just use the INI File - Delete Value action.
RobbyH
02-05-2003, 01:03 PM
I want to delete a value name from a particular section.
Some of the value names are the same, just under different sections, however, the findline doesnt discriminate by section, so I wanted to make sure that if I told it to start searching at the line where my section name is, that it will only get the one valuename. And, it seems it does /ubbthreads/images/icons/smile.gif
Lorne
02-05-2003, 03:05 PM
Why aren't you using INI File - Delete Value, though?
It was designed to do exactly that. /ubbthreads/images/icons/smile.gif
Unless this isn't an INI file...what kind of file is it?
RobbyH
02-06-2003, 10:35 PM
Ok
I thought using delete value only deleted the value, but left the valuename, but I just checked, and I was wrong.
Thanx, Rob
Lorne
02-07-2003, 08:54 AM
"When in doubt, try it out." /ubbthreads/images/icons/wink.gif
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.