AnsweredAssumed Answered

Get script folder from a script tool in a toolbox

Question asked by npssde on Feb 5, 2013
Latest reply on Feb 6, 2013 by curtvprice
Hello,

I have some custom ArcGIS toolboxes containing script tools (v10.0 and v10.1) written in Python.  Is there a way in Python to get the folder path of the script tool that is being executed?   I tried
os.getcwd()
but that returns the default path for the MXD in which the tool is running, which usually isn't in the same location as the script tool(s).  And, the
arcpy.env.workspace
property isn't an option for my scripts. 

I'm likely missing something obvious.  Any help appreciated!

Lisa

Outcomes