When creating the db using the Properties array, if I use a literal like "/iris/db/<instance name>/<directoryname>" it's created in the correct directory.
set Properties("Directory")="/iris/db/InstanceName/DirectoryName"
InterSystems IRIS is a Complete Data Platform
InterSystems IRIS gives you everything you need to capture, share, understand, and act upon your organization’s most valuable asset – your data.
As a complete platform, InterSystems IRIS eliminates the need to integrate multiple development technologies. Applications require less code, fewer system resources, and less maintenance.