I don't use file commands, but you may try:

$fopen(name).pos

File commands may not actually consider line breaks, so you may have to count the number of $crlf or $cr or $lf from the start of the file to the current position.

-genius_at_work