New topic: Identical files
<http://forums.realsoftware.com/viewtopic.php?t=46097> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message Jym Post subject: Identical filesPosted: Fri Nov 30, 2012 7:10 pm Joined: Sat Oct 01, 2005 5:19 pm Posts: 3182 Is there a way to tell if 2 files are 100% identical with the exception of date? Top markwalsh Post subject: Re: Identical filesPosted: Fri Nov 30, 2012 7:14 pm Joined: Wed May 20, 2009 4:43 pm Posts: 912 What type of files? What platform? I use diff in the terminal on Mac, but I have only used it with text files. Don't know if it will work with any other file types. _________________ RB 2009r4 Windows XP Top DaveS Post subject: Re: Identical filesPosted: Fri Nov 30, 2012 7:33 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4312 Location: San Diego, CA if you want to know... "Does file_A equal file_B? yes or no?" Open both with as BinaryStream.... read them into a two string variables does str_a=str_b? That will work for text.... and binary data. but MAY or MAY not work for Graphics (jpegs can be re-encoded and will "look" the same, but not be the same internally) _________________ Dave Sisemore MacPro, OSX Lion 10.7.4 RB2012r1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top charonn0 Post subject: Re: Identical filesPosted: Fri Nov 30, 2012 8:12 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1023 Location: San Francisco, CA, USA Compare the MD5 output for both files' contents. _________________ Boredom Software Top Thom McGrath Post subject: Re: Identical filesPosted: Sat Dec 01, 2012 1:02 am Site Admin Joined: Tue May 06, 2008 1:07 pm Posts: 1285 Location: Greater Hartford Area, CT DaveS wrote:if you want to know... "Does file_A equal file_B? yes or no?" Open both with as BinaryStream.... read them into a two string variables does str_a=str_b? That will work for text.... and binary data. but MAY or MAY not work for Graphics (jpegs can be re-encoded and will "look" the same, but not be the same internally) Unless the difference is in case only. Charron is right, MD5 is your best choice for this. _________________ Thom McGrath - @tekcor Web Framework Architect, Real Software, Inc. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
