To capture the filename of your file you can use the following technique:
Define a container field (can be global)
Use Insert File with the "store a reference" option to insert a reference of your import file into this field.
You can now use a calculation to extract the filepath of the file to store in a variable you can use with the import records step to import the csv data. Since you have the filepath in a variable, you can then use text functions to extract the filename from this variable to store in your database.
Set up right, the user get's an open file dialog to use to select the csv file for importing. When the user selects the file and clicks open, the data is imported and the filename is also captured and stored into the location you specify in your script.
Here's the text function for extracting the filepath from a container field where "store a reference" was used to insert the file:
GetValue ( containerField ; 2 )
Thank you, I will give that a go.. :-)