Bookmark Topic Watch Topic
  • New Topic

Comparing data in 2 files in different folders  RSS feed

 
Ranch Hand
Posts: 99
  • 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 java.io.File 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
Marshal
Posts: 37518
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can you read in the files and compare them?
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java 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.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!