Announcement

Collapse
No announcement yet.

Question about text file findline and delete line

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about text file findline and delete line

    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.

  • #2
    Re: Question about text file findline and delete line

    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. [img]/ubbthreads/images/icons/smile.gif[/img]

    For example, if you're wanting to delete a value from an INI file, just use the INI File - Delete Value action.
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: Question about text file findline and delete line

      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 [img]/ubbthreads/images/icons/smile.gif[/img]

      Comment


      • #4
        Re: Question about text file findline and delete line

        Why aren't you using INI File - Delete Value, though?

        It was designed to do exactly that. [img]/ubbthreads/images/icons/smile.gif[/img]

        Unless this isn't an INI file...what kind of file is it?
        --[[ Indigo Rose Software Developer ]]

        Comment


        • #5
          Re: Question about text file findline and delete line

          Ok
          I thought using delete value only deleted the value, but left the valuename, but I just checked, and I was wrong.
          Thanx, Rob

          Comment


          • #6
            Re: Question about text file findline and delete line

            "When in doubt, try it out." [img]/ubbthreads/images/icons/wink.gif[/img]
            --[[ Indigo Rose Software Developer ]]

            Comment

            Working...
            X