var doc = app.activeDocument

var parts = doc.name.slice(0, -4).split("-")

var filename = parts.slice(1).join("-")

var filepath = "/Users/crux/furry/macrovision/media/characters/" + parts[0] + "/" + filename

doc.exportFile(File(filepath), ExportType.SVG)