Try this....
Call FindFilesBySearchConditions in the Document Service. Don't pass in any
'conditions' or 'folderIds', which results in every file in the Vault being
returned. Also set the File Name property as the 'sortCondition'.
When you run this function, it results in an alphabatized list of all files
in the Vault. Now you can simply scan the list. If you find that a file
name matches the name of the previous file in the list, you have a
duplicate.
If you are using a Vault 2008 or earlier, you will not have the ability to
sort on a property, so it's a bit harder. In this case, I suggest scanning
through all the folders and remembering the names of the files that you find
with a Dictionary class or something similar.
Doug Redmond
Software Engineer, Autodesk Inc.