Um, did you actually look in the command reference? (okay, I guess you did if you got your other code example from there). Anyway, look under "file" for all your file commands... then look up the command, "readfile"... there is a complete working example program there.