怎样将两个文件的相同内容进行比较,然后提示两个文件有相同内容例:
文件1 和文件2 进行比较
文件1里面的内容 123aaa 文件2里面的内容是 456aaa
它们的相同内容是aaa
然后提示它们的相同内容是aaa
请问怎么实现啊?解决立马给分
文件1 和文件2 进行比较
文件1里面的内容 123aaa 文件2里面的内容是 456aaa
它们的相同内容是aaa
然后提示它们的相同内容是aaa
请问怎么实现啊?解决立马给分
解决方案 »
- 在vb6里,使用Listview进行排序!急急
- 局域网中将一台客户机上屏幕内容实时传播至其它计算机上
- 100分求教如何用ADO创建新的数据库?
- 停车场收费记费问题====急!!!!
- 拜托,请大家继续关注http://community.csdn.net/Expert/topic/3962/3962586.xml?temp=.7703211
- Printer.orientation在控件中报错
- 如何在下拉框拉开的时候获得鼠标移动事件?
- 加载错误:行 30: 属性 TextRTF在 RichTextBox1 中有无效值。
- 关于SQLDMO的用法
- 在VB中我遇到了一个关于软删除硬删除的问题,哪位高手帮一下忙?
- 请问怎么改正错误
- 模仿HookMenu自己写了一个控件 -LS.H
Dim issame As Boolean
Open F1 For Binary As #1
Open F2 For Binary As #2issame = True
If LOF(1) <> LOF(2) Then
issame = False
Else
whole& = LOF(1) \ 10000 'number of whole 10,000 byte chunks
part& = LOF(1) Mod 10000 'remaining bytes at end of file
buffer1$ = String$(10000, 0)
buffer2$ = String$(10000, 0)
start& = 1
For x& = 1 To whole& 'this for-next loop will get 10,000
Get #1, start&, buffer1$ 'byte chunks at a time.
Get #2, start&, buffer2$
If buffer1$ <> buffer2$ Then
issame = False
Exit For
End If
start& = start& + 10000
Next
buffer1$ = String$(part&, 0)
buffer2$ = String$(part&, 0)
Get #1, start&, buffer1$ 'get the remaining bytes at the end
Get #2, start&, buffer2$ 'get the remaining bytes at the end
If buffer1$ <> buffer2$ Then
issame = False
End If
Close
CompFile = issame
End Function