Perhaps it's a four liner when you take the fixed C# FtpClient class. :P
1. Download File 2
2. Open File 1
3. Open File 2
4. Compare File 1 Content & File 2 Content
^^
Got a bit tired of waiting so I decompiled it myself. Here's the source I got out of it.
https://mega.co.nz/#!4RFFVAqT!EDcbll...lw9yy072u5m7zs
No idea if it actually compiles yet.
#in Python Auto Updater ;)
#compile it to exe so you could use it :P
import urllib as hi
#getwebVersion
webversion = hi.urlopen('http://www.site.com/text.txt')
# '1.2' inside the text.txt
readWeb = webversion.read()
evalweb = eval(str(readWeb))
#getmyversion
getmyVersion = open('myversion.txt', 'r+)
# '1.1' ibside the myversion.txt
readmyVersion = getmyVersion.read()
evalmyversion = eval(str(readmyVersion))
compare = float(evalweb) > float(evalmyversion)
if compare == True:
try:
get = hi.urlopen('www.site.com/file')
get.retrieve()
except:
print "ooops"
finally:
print "finished"
else:
pass
Sent from iPhone via Tapatalk