Now I can write data from program to text file by using WriteString() and SeekToEnd().
So I want to write program to copy all data within first text file to second text file by using CStdioFile

Do you know how to do that?
Thank you for your answer.

These below is some part of my program to write data from program to text file by using CStioFile

Code:
	outp_filename = m_uniquecodeFileName;

	CStdioFile EncryptedUniqueCode;
	CFileException FileExc;
	UINT nOpenFlags;
	CString szTemp, m_string;
	nOpenFlags = CFile::modeWrite;
	if (!EncryptedUniqueCode.Open(outp_filename, nOpenFlags, &FileExc)) {
	FileExc.ReportError();
	return;
	}
	EncryptedUniqueCode.SeekToEnd();

// m_string has some value
                                              .
                                              .
                                              .

	EncryptedUniqueCode.WriteString(m_string+'\n');

	EncryptedUniqueCode.Close();