if windows[0] == "6": trans_dir = os.getenv("USERPROFILE") +os.sep+ r"AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\CustomTransformations" elif windows[0] == "5": trans_dir = os.getenv("USERPROFILE") +os.sep+ r"Application Data\ESRI\ArcToolbox\CustomTransformations"
Solved! Go to Solution.
import arcpy import os def ArcGISProfile(profilePath=None): """ArcGIS Windows user profile path""" APPDATA = arcpy.GetSystemEnvironment("APPDATA") if arcpy.GetInstallInfo("DESKTOP")['Version'].find("10") == -1: path = os.path.join(APPDATA,"ESRI") else: path = os.path.join(APPDATA,"ESRI/Desktop10.0/") return os.path.realpath(os.path.join(path,profilePath)) print ArcGISProfile("ArcToolbox\CustomTransformations")
C:\Documents and Settings\cprice\Application Data\ESRI\Desktop10.0\ArcToolbox\CustomTransformations