BatchHacker

[Simple-Batch] file comparator

Nov 16th, 2013
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. set blanc= >>nul
  3. title file comparator
  4. :NoInput1
  5. cls
  6. echo Please insert the 1. file with drag and drop!
  7. echo.
  8. set /p File1=1-File:%blanc%
  9. if "%File1%"=="" goto NoInput1
  10. :NoInput2
  11. cls
  12. echo Please insert the 2. file with drag and drop!
  13. echo.
  14. set /p File2=2-File:%blanc%
  15. if "%File2%"=="" goto NoInput2
  16. SET /p BinaryFile1=<%File1%
  17. SET /p BinaryFile2=<%File2%
  18. if "%BinaryFile1%"=="%BinaryFile2%" goto Equal
  19. cls
  20. echo The files are not equal!
  21. echo.
  22. pause>>nul
  23. exit
  24. :Equal
  25. cls
  26. echo The files are equal!
  27. echo.
  28. pause>>nul
  29. exit
Advertisement
Add Comment
Please, Sign In to add comment