I am trying to create a copy of a layer already on the map. It works great when I hardcode the file extension or the layer is in a gdb. The problem is that I won't know that when the user clicks copy. How do I programmatically find out the file extension? I know that it is stored since I can see it when I go to the layer properties in ArcPro, but I can't figure out how to see that programmatically.
Thank you,
Susan
I am also having this issue. When using Layer.GetPath(), I receive the path to the correct file, but it does not have the file extension, e.g. .shp.