Private Sub Command1_Click()
Dim fs As Object, f As Object, allStr As String
Set fs = CreateObject("Scripting.FileSystemobject")
Set f = fs.opentextfile("F:\xx.txt", , True) '读取F盘下的文本文件xx.txt
allStr = f.readall '读取该文本中的所有内容
Set f = Nothing
'因为你表述不是很明确,请测试前确保记事本中的行数大于或等于A目录下的文件数,否则将数组的下标越界
Dim arr, ff As Object, fc As Object
Set ff = fs.getfolder("F:\A") '读取F盘下A目录内的所有文件
Set fc = ff.Files '获取A目录下所有文件
arr = Split(allStr, vbCrLf) '将记事本中的内容按行提取到数组
Dim i As Object, n As Integer
For Each i In fc '在A目录下的每一个文件中进行循环
Name i As "F:\A\" & arr(n) & ".txt" '重命名
n = n + 1
Next
Set fs = Nothing
End Sub