A script component allows you access SSIS variables in the Variables collection, once you've added them to the read or read/write collection.
The syntax for doing so is
MyOutputBuffer.MyColumn = Variables.FILE_NAME;
A script task is different in that you would need to access the Value method and then cast to the resulting value from Object to the correct type.
There are two other ways of adding the value of FILE_NAME into your Data flow. The second and more SSIS-centric way would be to use a Derived Column Component with an expression like
@[User::FILE_NAME]
assuming that you've defined this as a new column named MyColumn and have a type like DT_WSTR(120)
The other, assuming this was a Flat File Source, is to go to the Advanced properties and include the filename as a column.
I blogged about the latter approaches under What is the name of current file if you're looking for a thrilling read.
FILE_NAME? What isMyColumn? What do you mean by "store this as output"?