PURPOSE: To decrease the length of a data to be sent and received by coding the pattern of a character string and transferring the result by a file transfer device when it is discriminated that the pattern of the character string is identical to that already sent by a character string retrieval means.
CONSTITUTION: When a command of file transfer is issued, a read control section 12 reads one by one character string sequentially from a file device 11. A deciding circuit 13 decides whether a read-out character string has a pattern having already sent or a first pattern. Thus, a retrieval control section 17 retrieves whether or not a character string of the same pattern as that of the read-out character string exists in a storage table 18. The circuit 13 decides the character string as an unsent pattern character string when the pattern is not retrieved and registers the pattern in a table 18 together with a code number and sends it to a transmission circuit 16. On the other hand, when the relevant character string is retrieved, the circuit 13 decides the pattern as the pattern character string sent already and sends only the code number added to the retrieved character string via the circuit 16. Thus, the length of data to be sent/received is reduced.