This question already has an answer here:
I have a function that works with a list and outputs it. Is it possible to also get the name of the list as an argument? Right now my code is
exportPrognosisData[data_] := Export[StringJoin[ToString[HoldForm[data]], ".csv"], data]
But the resulting file name is the list and not its title.