I would suggest using your favourite scripting language and do something like (this may not be optimal but should work):<br><br>---<br>iterate over all filenames, for each one do:<br>  find canonical name (use a regex to get the file part, then shift to lowercase - eg /one/two/Three becomes three)
<br>  build a hashmap with the key being the cnaonical name, and the value being an array (or list) of actual filenames<br><br>now iterate over the list of keys, for each one do<br>  if there's only 1 entry in the array, delete it
<br>  if there's more, do whatever you wanted to do with the files<br>    I'd also do a check to see if the actual filenames are the same - /one/two/Three and /one/Three may cause a clash)<br>---<br><br>alternatively, use a series of shell commands and files to do a similar thing (less efficient, but no development really needed):
<br><br>----<br>find to generate the list of files in a file<br>sed to prepend the canonical name to each line, with a comma separator<br>sort to group them by canonical name<br>uniq -df to find duplicated files only<br>awk to turn this into a list of commands like "echo /one/two/Three >> three"
<br>----<br><br>... now you have the same data structure as before (keys are filenames), so you can do whatever with the contents of each file, like loop over each key, and process the contents somehow (maybe using head, basename and dirname).
<br><br>Slightly more convoluted, but ... :-)<br><br><br>Hope this helps.<br><br>Cheers<br><br>Richard<br>  <br><br><div><span class="gmail_quote">On 20/09/2007, <b class="gmail_sendername">Jon Dye</b> <<a href="mailto:jon@pecorous.co.uk">
jon@pecorous.co.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I have a directory tree full of files and I'd like to find all the files
<br> whose names only differ in case.  Where files differ by case they<br>should be in the same directory as each other, e.g.<br><br>/one/two/three<br>/one/two/Three<br>/one/four<br>/one/Four<br><br>Does anyone have any suggestions as to how I can achieve this?
<br><br>This is a result of transferring the files to windows and back and I<br>want to delete the duplicates so I only have one copy of each file.<br><br>The contents should be identical if that's any help.<br><br>JD
<br><br>--<br>"The NRA says guns don't kill people... people kill people. I think the<br>gun helps!"<br>                - Eddie Izzard<br><br><br>--<br>Gllug mailing list  -  <a href="mailto:Gllug@gllug.org.uk">
Gllug@gllug.org.uk</a><br><a href="http://lists.gllug.org.uk/mailman/listinfo/gllug">http://lists.gllug.org.uk/mailman/listinfo/gllug</a><br><br><br></blockquote></div><br>