Just as alternative: you may do this directly from the Aggregate Report listener.
1. set filename/template for results file:
resultsFile = ${__property(user.dir)}${__BeanShell(File.separator,)}result_${__time(yyyyMMdd-HHmmss)}.csv
2. configure Aggregate Report listener as shown below:
CSV-file generated in this case will differ from generated via GUI/"Save Table Data" one.
If it is not acceptable you'll better use method with JMeterPluginsCMD from previous answer:
java -jar JMeterPluginsCMD.jar --generate-csv aggregateResults.csv --input-jtl testResults.jtl --plugin-type AggregateReport