Hi,
I tried to write a program for converting rich text files in my local directory into text files.
After I finish running my program, the extension of files were changed to .txt. However, I used notepad to open those files, and there were a lot of unknown data instead of correct text.

I will attach my program here for help. I will very appreciated any help.

Sub FileExtension()

Dim filepath As String
Dim filertf As String
Dim filetxt As String

filepath = "C:\temp\"
filertf = Dir(filepath & "*.rtf")

While filertf <> ""
filetxt = Left$(filertf, Len(filertf) - 3) & "txt"
Name (filepath & filertf) As (filepath & filetxt)
filertf = Dir

Wend

End Sub

Thank you.