Animated routes with QGIS
Topi Tjukanov

For creating folders you could do:

# This gets the folder that the script is running in
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))

SWEDEN_FOLDER = "sweden"

# Create folder if it does not exist
if not os.path.exists(os.path.join(ROOT_DIR, SWEDEN_FOLDER)):
os.makedirs(os.path.join(ROOT_DIR, SWEDEN_FOLDER))
# Using os.path.join should make it work cross platform
Like what you read? Give Heikki Vesanto a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.