On my own machine, I know that my Database Connections are in C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog . I also know that %APPDATA% will take me half-way there. On another person's machine, the user name will be different, but the version of Desktop might be also. I need to write, distribute, and run a script in my organization on selected machines. The script has to find the full path to a database connection that we all have so that I can use it in arcpy.mapping. I tried arcpy.ListWorkspaces() but that returns None.
What arcpy function can I use to list the full Windows path to database connection files on the current user's machine?
This question has been asked for some time now. I had the same doubt today and it seems arcpy still doesn't have such a function, but here it goes an alternative: