Exporting mesh as CSV file
Use the name of the object as the file name

import bpy
import os

name = bpy.context.object.name
outputFile  = bpy.path.abspath("//csv_export\\" + name + ".csv")

print(outputFile)


If I save my file in D:\ and my object is named Cube, the outputFile will be D:\csv_export\Cube.csv.

Increase a suffix number for each export

import bpy
import os

index = 0
while True:
    path = "//csv_export\\mesh" + str(index).zfill(4) + ".csv"
    outputFile = bpy.path.abspath(path)
    if not os.path.exists(outputFile):
        break
    index += 1

print(outputFile)


In this script, we initially construct a path to a file with the suffix 0 =&gt; mesh0000.csv. While a file already exists at that location, we increase the counter.