create a filesystem object, then open two files as text streams, then using the readline method, get each line and compare them, or if you wanted to compare character by character, i think the read method allows you to pass as a parameter the number of characters you want to read