Best way to create folders using custom file path?

Hi Jess

Welcome to the forums, thanks for posting here!

I would say that this scenario sounds like you would want multiple roots. Is this something you have considered already?

Also is this a custom app?

If it is a custom app, and you wanted to restrict the creation of the folders in the second root to only be created when your app ran, you could set a defered_creation setting on the second root’s project folder. Something like:

defered_creation: ["custom-app-name"]

Then in your app you could run the folder creation, something like

tk.create_filesystem_structure(entity_type, entity_id, engine="custom-app-name")

If your app also needs to create files within that root, you could have template paths setup to use the root as well, and configure your app to use them.

Note: I’ve not actually tried setting a defered_creation flag at a project folder level before, so I’m not certain if that will work.

2 Likes