You could read the file into an array with the ReadFile() UDF, get the location of "pcAlias=" with ASCAN, change the value, and re-write the file with the WriteFile() UDF:

for each $Element in $PClist
    $array = ReadFile("fsp.ini")
    $loc = AScan($array, "pcAlias=",,,1)
    if $loc <> -1
       $array[$loc] = "pcAlias="+$Element
       $ = WriteFile("fsp.ini",$array)

However, the logic you have mapped out would ultimately just replace the same line in the same file repeatedly until the end of the array, so I'm a little confused as what you're really trying to do...

Edited by eriqjaffe (2009-11-25 09:08 PM)