for example
http://www.sitename.com/section1/pagename.aspx
http://www.sitename.com/section2/pagename.aspx
I need quick report only for pages which has same name. like "pagename.html" in example.
for example
http://www.sitename.com/section1/pagename.aspx
http://www.sitename.com/section2/pagename.aspx
I need quick report only for pages which has same name. like "pagename.html" in example.
If this is a Sitecore site as I'm led to believe, could you not just go into the Content Editor and search for the name you're looking for? Anything with the item name of "pagename", for example, will have a URL ending with "pagename.aspx" in your standard Sitecore install. Just make sure you're looking at the actual item name and not the display name, as they can be quite different at times depending on how you've got the URL's set up.
I would write a quick utility program to just traverse the content tree programmatically, saving the names to a dictionary... when you hit an item that is already in the dictionary, you've got a name collision.
One thing you might consider is writing a filter (I think that is what it is called) for this
http://trac.sitecore.net/AdvancedSystemReporter
That would allow you to have a nice interface in Sitecore for viewing duplicate item names.
How big is your database, and how is your LINQ to Objects? Theoretically you could write a LINQ query against Database.Items that looks for items with the same name that descend from the same site branch of your content tree. This could be very memory intensive if your master DB is large, but would not be difficult to code.
Edit -- if you can loop over all your site items, you could do something like this (untested):
var items = siteItem.Axes.GetDescendants();
var dupes = from item in items
join item2 in items on item.Name equals item2.Name
where item.ID != item2.ID
select item;