I have been trying to use fopen as well as other fXXX commands to open a current .was file, move the cursor position to a specific line, capture everything on that line (lets say that line only contained the text [s1 = "oldpassword"] without the brackets) and assign that text to a string (we will call the string "oldline"). I would then replace everything on that line using fputs with a different predetermined string (lets say the string name was "newline" and it contained [s1 = "newpassword"] without the brackets). I will then use strcat to edit the "oldline" string I captured to look like this [;s1 = "oldpassword"] without the brackets, and call this newly created string "updtdoldline". I want to then move the cursor to the bottom of the script, to a line after the endproc command. I will there overwrite the contents of that line with the "updtdoldline" string. Basically what this script is going to be is a password change script. It will allow the user to edit a "password" file that sets a global variable to what the users password is. I use the same password for different switches. So far I can only get the script to work if I use multiple [if fgets 0 XXXXXX] commands in a row (however many needed to get to the desired line..). I know there has to be a way to go to a specific line number, but I cant figure it out. I dont want to use just a character number because that would change based on what the previous string lengths were (a username string is the line before in the password script). Below is the current "password" script format I have been using. I "modified" my approach for this new script I am trying to create while I was typing this post, so I will post my password change script once I have applied the changes I want to make. How do I get the script to move the cursor position to a specific line????