Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing 2 files
Message
De
24/11/2016 15:32:54
 
 
Information générale
Forum:
Windows
Catégorie:
Autre
Versions des environnements
OS:
Windows 10
Divers
Thread ID:
01642400
Message ID:
01643929
Vues:
43
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform