用vb怎样把一个文件夹中多个包含QQ号的文本文件转换成邮箱?
发布网友
发布时间:2024-10-22 01:20
我来回答
共2个回答
热心网友
时间:2024-10-22 02:25
Private Sub Command1_Click()
Dim arr() As Byte
ml = "D:\222\"
If Dir(ml & "333", vbDirectory) = "" Then MkDir ml & "333"
f = Dir(ml & "*.txt")
Do While f <> ""
s = s & "/" & f
f = Dir
Loop
arr1 = Split(Mid(s, 2), "/")
For i = 0 To UBound(arr1)
filenum = FreeFile
Open ml & arr1(i) For Binary As #filenum
ReDim arr(1 To LOF(filenum))
Get #filenum, , arr
Close #filenum
arr2 = Split(StrConv(arr, vbUnicode), vbCrLf)
For j = 0 To UBound(arr2)
If arr2(j) <> "" Then arr2(j) = arr2(j) & "@qq.com"
Next
filenum = FreeFile
Open ml & "333\" & Left(arr1(i), Len(arr1(i)) - 4) & "邮箱" & Right(arr1(i), 4) For Output As #filenum
Print #filenum, Join(arr2, vbCrLf)
Close #filenum
Next
End Sub
热心网友
时间:2024-10-22 02:18
这些个号码哪来的?不是木马搞来的吧?