I have drafted the script to export the ai to JPEG with resolution 300 PPI and some presets. By executing the script the file was saved with the expected output in the respective selected folder, but the file name has the "-01" at the end.
I know that even if we exporting the ai > JPEG (exporting to the size of Artboard) without script also, it adding the "-01" to the end of the file name.
Whether any possibilities are there to resolve this using script orelse this will come up with -01 at the end of file name.
When you save to Artboards, each file is suffixed by a number (or by the NAME of an artboard), even if there's only one artboard in the file. This is the current designed behaviour so I'm not sure if there's anything you can do about it while using Use Artboards in your action