Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing 2 files
Message
From
24/11/2016 15:32:54
 
General information
Forum:
Windows
Category:
Other
Environment versions
OS:
Windows 10
Miscellaneous
Thread ID:
01642400
Message ID:
01643929
Views:
42
VFP provides the filetostr function and can compare exactly 2 files as code below.
its a simple test before going to fine investigations with heavy solutions.if 2 files equals no need to use a third software.
local m.lcfile1,m.lcfile2
m.lcfile1=getfile()
m.lcfile2=getfile()

if empty(m.lcfile1) or empty(m.lcfile2)
return .f.
endi

if filetostr(lcfile1)==filetostr(lcfile2)  &&exact string compare
messagebox(lcfile1+"  equals  to  "+lcfile2++chr(13)+"  length (chars)="+trans(len(filetostr(lcfile1))))
else
messagebox("2 files not equals"+chr(13)+lcfile1 +  " [len (chars)="+trans(len(filetostr(lcfile1)))+"]  "+chr(13)+lcfile2 +" [len (chars)="+trans(len(filetostr(lcfile2))))
endi
Previous
Reply
Map
View

Click here to load this message in the networking platform