For Programmers: Free Programming Magazines  


Home > Archive > Clipper > October 2005 > Re: Compare EXE files ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Compare EXE files ?
sali

2005-10-02, 6:55 pm

"Otto" <ohaldi@freesurf.ch> wrote in message
news:VA.00000389.00210a7f@freesurf.ch...
> Hello to all
>
> In a small network I have a clipper program. I like to
> update automatically the exe if it change it on the Server.
> To start the program I'm using a batch file. I like to find
> a small utility who compare the exe before I start the
> program. Could somebody help me ?
>



usually comparing directory info [filesize & timedate] is enough.
complete binary compare or hash or crc requires whole file to be copied each
time over network [to access its binary content], so it is easier to realy
copy exe each time from server to workstation.

example of batch job for directory check & execution:
------------------------------
dir x:myexe.exe | find "myexe.exe" > server.tmp
dir c:myexe.exe | find "myexe.exe" > local.tmp
fc /b server.tmp local.tmp
if not errorlevel 1 goto equal
if not errorlevel 2 goto different
goto end

:different
copy x.myexe.exe c:
goto execute

:equal
goto execute

:execute
c:myexe.exe

:end
-------------------------------



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com