daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\file1.txt",1)
  2. Dim S(100), K(100), flag1, flag2, strLine, ic, jc, check
  3. flag1 = 1
  4. do while not objFileToRead.AtEndOfStream
  5.     strLine = objFileToRead.ReadLine()
  6.     S(flag1) = strLine
  7.     flag1 = flag1 + 1
  8. loop
  9. objFileToRead.Close
  10. Set objFileToRead = Nothing
  11. if S(1) = "" then
  12.     WScript.Echo "2"
  13.     WScript.Quit
  14. End if
  15. Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\file2.txt",1)
  16. flag2 = 1
  17. do while not objFileToRead.AtEndOfStream
  18.     strLine = objFileToRead.ReadLine()
  19.     K(flag2) = strLine
  20.     flag2 = flag2 + 1
  21. loop
  22. objFileToRead.Close
  23. Set objFileToRead = Nothing
  24.  
  25. For ic = 1 to flag1 - 1
  26.     check = 0
  27.     For jc = 1 to flag2 - 1
  28.         if ic <> jc then
  29.             if S(ic) = K(jc) then check = 1
  30.         End if
  31.     Next
  32.     if check = 0 then
  33.         WScript.Echo "1"
  34.         WScript.Quit
  35.     End if
  36. Next
  37.  
  38. WScript.Echo "0"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top