Guest User

Untitled

a guest
Dec 11th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. package require twapi
  2. proc diff {file1 file2} {
  3. set f1 [open $file1 "rb"]
  4. set f2 [open $file2 "rb"]
  5. try {
  6. while 1 {
  7. if {[read $f1 4096] ne [read $f2 4096]} {
  8. return 0
  9. } elseif {[eof $f1]} {
  10. # The same if we got to EOF at the same time
  11. return [eof $f2]
  12. } elseif {[eof $f2]} {
  13. return 0
  14. }
  15. }
  16. } finally {
  17. close $f1
  18. close $f2
  19. }
  20. }
  21.  
  22. CreateObject("Wscript.Shell").Run "diff.tcl",0,True
Add Comment
Please, Sign In to add comment