Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Comparing data in 2 files in different folders

Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am working on an app that download files from an sftp server...comparing things in a server and on a local machine got a bit too much for me! So i have decided to download the txt. files to a temp folder. What i am trying to do is compare the data newly downloaded txt file with the one in the local machine. So that if the contens of the files are the same i can do X if not Y. Any help! Ive tried hashCode() from and lastModified() but those function calls refer to pathfilename and that is why i dont think the comparision is working for me.
author & internet detective
Posts: 39339
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can you read in the files and compare them?
Posts: 21758
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please UseOneThreadPerQuestion. This is the same question as this one. I don't think Campbell, Ernest and Marc mind if I close this thread.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!