What is the p20 folder

228
5
Jump to solution
04-07-2021 09:54 AM
ChrisHolmes
Occasional Contributor III

If I run the following:

arcpy.ExtractPackage_management(prjTemplate, projectFolder)

Where:

prjTemplate = X:\Dev\BrokenLinks\ProjectTemplate\blankProject.aptx

projectFolder = X:\Projects\Project1

The template will be extracted to:

X:\Projects\Project1\p20\blankProject.aprx

What's this 'p20'?

thanks

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

This is by design. Whether you extract a Project Package/Template using an arcpy.ExtractPackage_management() function or the Extract Package GP Tool, the data gets extracted inside the subfolder ...\p20.

View solution in original post

0 Kudos
5 Replies
DanPatterson
MVP Honored Contributor

Not clear from your example whether the projectFolder existed already.  Because if it didn't, it would create a new one.

Extract Package (Data Management)—ArcGIS Pro | Documentation

In your case  X:\Projects\Project1 passed but in future you might want to try "raw encoding" the file

r"X:\Projects\Project1"  # --- note the little .... r ....

in case it got confused along the way.

On a side note... you didn't do 19 others already?  😉


... sort of retired...
ChrisHolmes
Occasional Contributor III

Hi Dan,

I guess I wrote my question as pseudo code to be quicker (or lazier?). No, thankfully there are not 19 previous to 20. 

I am using os.mkdir to create projectFolder before calling extract package. After reading your comment I did a quick test without making the folder first and you're right it does create the folder while extracting the template. But it still works the same and add the \p20 folder.

In a nutshell, I'm expecting:

X:\Projects\Project1\blankProject.aprx

but what I'm getting is:

X:\Projects\Project1\p20\blankProject.aprx

Thanks 😊

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

This is by design. Whether you extract a Project Package/Template using an arcpy.ExtractPackage_management() function or the Extract Package GP Tool, the data gets extracted inside the subfolder ...\p20.

View solution in original post

0 Kudos
ChrisHolmes
Occasional Contributor III

Ok. Thanks Jayanta. I find that interesting... but good to know. Now when I deploy my Pro toolbox (which replaces a ArcMap toolbox) I can tell the endusers that the p20 folder is there by Esri's design. I wonder if it works like this in ArcMap? My toolbox in ArcMap doesn't use ExtractPackage so I can't say.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Project Package/ Project Template only applies for ArcGIS Pro. Extract Package in ArcMap doesn't work with Project Packages/Templates.

0 Kudos