Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Get script folder from a script tool in a toolbox

$
0
0
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
Code:

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
Code:

arcpy.env.workspace
property isn't an option for my scripts.

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

Lisa

Viewing all articles
Browse latest Browse all 2485

Trending Articles