import bpy import os filepath = bpy.data.filepath filepath_split = os.path.split(filepath) #list with [path, name]