AnsweredAssumed Answered

How to use arcpy to list Database Connection Files

Question asked by Underscore on Jun 4, 2018

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?

Outcomes