On Mon, Mar 7, 2011 at 11:48 AM, New C. <coding25 / yahoo.com> wrote: > I have a got a few folders which may have same files under different > names. > Is there any way I can find which these files are using ruby ? > > The files with text (*.doc, *.txt ...) should be pretty easy to check > but what about pdf files, exe files etc ? > > I wondering if there is some sort of diff module that can do this. There's File.compare. Depending on how many comparisons you're going to do, it might be a good idea to precompute checksums and compare the checksums.